From 6171bde5eefb8965eb8f41b95af862a18ae4fe41 Mon Sep 17 00:00:00 2001 From: Jean Guyader Date: Thu, 4 Jun 2009 17:21:09 +0100 Subject: [PATCH] Import changes from carbon/dom0.pq.hg (CS 522:97ed089a13c4) --- master/CA-27974-fix-shutdown-race.diff | 36 + ...ridge-no-topology-change-when-no-stp.patch | 13 + master/build-system-integration.patch | 2 +- master/debug-dump-skb-info-when-invalid | 72 +- master/forward-port-drivers-xen.patch | 293 +- master/kernel-configuration | 2612 +- ...c-define-vmcore_elf_check_arch_cross.patch | 12 + master/linux-2.6.18-xen.hg-847.ad4d307bf9ce | 10786 +++ master/linux-2.6.18-xen.hg-848.ab1d4fbbe4bf | 594 + master/linux-2.6.18-xen.hg-849.3a4410c4504e | 112 + master/linux-2.6.27.19-5.1.patch | 72763 ++++++++-------- .../netback-tcp-and-ip-in-different-fragments | 25 +- master/oom-debugging | 46 +- master/series | 26 +- master/solarflare-sfc | 46 +- master/sync-drivers-xen.patch | 11 + master/tg3-build-without-vlan-support.patch | 13 + 17 files changed, 50856 insertions(+), 36606 deletions(-) create mode 100644 master/CA-27974-fix-shutdown-race.diff create mode 100644 master/bridge-no-topology-change-when-no-stp.patch create mode 100644 master/kexec-define-vmcore_elf_check_arch_cross.patch create mode 100644 master/linux-2.6.18-xen.hg-847.ad4d307bf9ce create mode 100644 master/linux-2.6.18-xen.hg-848.ab1d4fbbe4bf create mode 100644 master/linux-2.6.18-xen.hg-849.3a4410c4504e create mode 100644 master/tg3-build-without-vlan-support.patch diff --git a/master/CA-27974-fix-shutdown-race.diff b/master/CA-27974-fix-shutdown-race.diff new file mode 100644 index 0000000..655a6c5 --- /dev/null +++ b/master/CA-27974-fix-shutdown-race.diff @@ -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 index 0000000..a8ccd00 --- /dev/null +++ b/master/bridge-no-topology-change-when-no-stp.patch @@ -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) diff --git a/master/build-system-integration.patch b/master/build-system-integration.patch index 706d279..c7ad7fc 100644 --- a/master/build-system-integration.patch +++ b/master/build-system-integration.patch @@ -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 + diff --git a/master/debug-dump-skb-info-when-invalid b/master/debug-dump-skb-info-when-invalid index 73b7721..1d838af 100644 --- a/master/debug-dump-skb-info-when-invalid +++ b/master/debug-dump-skb-info-when-invalid @@ -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 #include @@ -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); diff --git a/master/forward-port-drivers-xen.patch b/master/forward-port-drivers-xen.patch index 9a6c5a9..3148536 100644 --- a/master/forward-port-drivers-xen.patch +++ b/master/forward-port-drivers-xen.patch @@ -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 @@ -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 #include @@ -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 @@ -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 @@ -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 #include /* 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 + */ + +-#include + #include + #include + #include +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 #include #include -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 @@ -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 /*! 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 #endif diff --git a/master/kernel-configuration b/master/kernel-configuration index 1edab8c..3e7d2b8 100644 --- a/master/kernel-configuration +++ b/master/kernel-configuration @@ -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 index 0000000..c123513 --- /dev/null +++ b/master/kexec-define-vmcore_elf_check_arch_cross.patch @@ -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 + #include + #include ++ ++#include + + #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 index 0000000..7268e57 --- /dev/null +++ b/master/linux-2.6.18-xen.hg-847.ad4d307bf9ce @@ -0,0 +1,10786 @@ +# HG changeset patch +# User Keir Fraser +# 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 + +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 + #include +-/* For out-of-tree builds we always need procfs, if only for a compatibility +- * symlink. +- */ + #include + #include + #include +@@ -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 +-#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 /* for struct list_head */ +-#if !defined(EFX_USE_FASTCALL) +- #include +- #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) +- #define EFX_USE_FASTCALL yes +- #include +- #endif +-#endif ++#include ++#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 + #include + #include +-#include + #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 + #include + #include +-#include + #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 +-#include ++#include + #include + #include + #include +@@ -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, ®, 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, ®, 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 +-#include + #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 ++#include + #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, ®, XM_MGT_INT_REG_MAC_B0); ++ efx->mac_op->mac_readl(efx, ®, 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, ®, 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, ®, 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, ®, XX_CORE_STAT_REG_MAC); + +- efx->mac_op->mac_writel(efx, ®, 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, ®, 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 + #include + #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 + #include +@@ -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 + #include + #include +- +-#include "extraversion.h" ++#include + + /* + * 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 +- /* 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 +@@ -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 +- 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 +- 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 +- 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 + #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 + #include + #include +-#include + #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 + #include +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 + #include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9) + #include ++#else ++#include ++#endif ++#include + #include + + /*-------------------------------------------------------------------- + * +- * 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 + +-#if defined(__linux__) && defined(__KERNEL__) + + # include + +-#else +- +-# include +- +-#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 + #include + #include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9) + #include ++#else ++#include ++#endif + #include + #include + #include +@@ -60,6 +64,21 @@ + /* get roundup_pow_of_two(), which was in kernel.h in early kernel versions */ + #include + #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 /* 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< ++#include ++#include ++#include ++#include + + /********* wait_for_completion_timeout() ********************/ +-#include + + /* 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 ++#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 + #include + +-#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 +-#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 + #include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9) + #include ++#else ++#include ++#endif ++#include + #include + + /*-------------------------------------------------------------------- + * +- * 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 + #include + #include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9) + #include ++#else ++#include ++#endif + #include + #include + #include +@@ -60,6 +64,21 @@ + /* get roundup_pow_of_two(), which was in kernel.h in early kernel versions */ + #include + #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 index 0000000..f4c51c9 --- /dev/null +++ b/master/linux-2.6.18-xen.hg-848.ab1d4fbbe4bf @@ -0,0 +1,594 @@ +# HG changeset patch +# User Keir Fraser +# 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 + +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(¬ifier_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 index 0000000..0e3676a --- /dev/null +++ b/master/linux-2.6.18-xen.hg-849.3a4410c4504e @@ -0,0 +1,112 @@ +# HG changeset patch +# User Keir Fraser +# 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 + +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); + } + + diff --git a/master/linux-2.6.27.19-5.1.patch b/master/linux-2.6.27.19-5.1.patch index 32fed1e..e889900 100644 --- a/master/linux-2.6.27.19-5.1.patch +++ b/master/linux-2.6.27.19-5.1.patch @@ -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. -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 @@ + + + + -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 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 +-Modified by Christoph Lameter +- +-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///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//tasks +- (after some time) +- # echo pid > /mnt/network//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 _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 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 --Modified by Christoph Lameter -- --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///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//tasks -- (after some time) -- # echo pid > /mnt/network//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 _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//io - Display the IO accounting fields 2.15 /proc//coredump_filter - Core dump filtering settings 2.16 /proc//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 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: - Each bit of the 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: - [,[,[,[,[,]]]]] -@@ -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: + 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 /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: ,,,,,,,, - ++ + tsc= Disable clocksource-must-verify flag for TSC. + Format: + [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 +Original Author: Peter P. Waskiewicz Jr. -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 " option needs to be specified with most of the + iscsiadm command. 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< @@ -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 -- */ -- ++ * Copyright (c) 2001-2007 Hewlett-Packard Development Company, L.P. ++ * Contributed by Stephane Eranian ++ * ++ * 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 + -/* - * 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 - * +- * - * 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 - +- -#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 + @@ -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 + + * 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 "); +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 #include #include - +- -#ifdef CONFIG_PERFMON -# include -#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 @@ -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 #include -@@ -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 #include @@ -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 #include -@@ -45,10 +46,6 @@ +@@ -44,10 +45,6 @@ + #include #include "entry.h" - +- -#ifdef CONFIG_PERFMON -# include -#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 #include @@ -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 #include @@ -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 #include -@@ -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 #include @@ -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 #include #include -@@ -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 #include @@ -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 #include -@@ -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 #include /* 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 #include #include /* 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", ®s, 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 #include @@ -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 #include @@ -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 #include @@ -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 #include -@@ -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 #include @@ -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 #include -@@ -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 #include @@ -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 #include -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 #include @@ -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 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 +/** + * __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 ++ +#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 #include - ++ +#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<thread.TS_FPR(reg); + else + ptr = (char *) ¤t->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 #include @@ -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 #include -@@ -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 #include #include @@ -48632,16 +48621,16 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/ptrace32.c linux-2.6.27.19-5.1/arch/ #include #include #include - -+#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 #include #include - ++ +/* 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 #include @@ -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 #include #include -@@ -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 #include @@ -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 #include #include -@@ -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 #include @@ -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 #include @@ -53890,7 +53877,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/52xx/efika.c linux-2.6.27.19-5.1/ #include #include #include -@@ -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 #include @@ -54695,10 +54682,11 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/embedded6xx/linkstation.c linux-2 #include #include -@@ -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 */ - -+#undef DEBUG + ++#undef DEBUG + #include #include - #include -@@ -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 #include - #include -@@ -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 */ - -+#define KMSG_COMPONENT "appldata" + ++#define KMSG_COMPONENT "appldata" + #include #include - #include @@ -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 */ - -+#define KMSG_COMPONENT "appldata" + ++#define KMSG_COMPONENT "appldata" + #include #include - #include @@ -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 #include - #include -@@ -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 */ - -+#define KMSG_COMPONENT "hypfs" + ++#define KMSG_COMPONENT "hypfs" + #include #include - #include -@@ -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 */ - -+#define KMSG_COMPONENT "hypfs" + ++#define KMSG_COMPONENT "hypfs" + #include #include - #include -@@ -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 * Bugreports.to..: @@ -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< #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(¤t->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 #include - #include -@@ -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: */ - -+#define KMSG_COMPONENT "s390dbf" + ++#define KMSG_COMPONENT "s390dbf" + #include #include - #include -@@ -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 * */ - +- -# -# 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 #include @@ -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 #include #include -@@ -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 #include @@ -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 #include -@@ -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 #include - #include @@ -32,7 +34,6 @@ #include #include @@ -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 #include #include -@@ -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 #include @@ -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 #include #include -@@ -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(¤t->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(¤t->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 = ¤t->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 #include - #include -@@ -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 #include @@ -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 #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 #include #include -@@ -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 */ - -+#define KMSG_COMPONENT "cpu" + ++#define KMSG_COMPONENT "cpu" + #include #include - #include @@ -12,6 +14,7 @@ #include #include @@ -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 #include #include -@@ -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..: * (C) IBM Corporation 2002-2004 */ - -+#define KMSG_COMPONENT "extmem" + ++#define KMSG_COMPONENT "extmem" + #include #include - #include @@ -24,39 +26,46 @@ #include #include @@ -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; isegcnt; 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<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 #include @@ -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 #include -@@ -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 #include @@ -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 #include -@@ -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 @@ -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 #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 #include @@ -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 #include #include -@@ -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//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 + @@ -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 + @@ -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 + + * 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 + @@ -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 #include @@ -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 #include @@ -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 #include -@@ -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 #include @@ -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 #include @@ -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 #include - -+#include + ++#include + 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 +#include @@ -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 #include @@ -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 #include -@@ -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 +#include @@ -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 #include @@ -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 +#include @@ -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 @@ -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 +#include @@ -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 #include @@ -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 #include @@ -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 #include @@ -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 +#include @@ -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 +#include @@ -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 @@ -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 #include #include -@@ -26,6 +30,34 @@ +@@ -25,6 +29,34 @@ + #include #include #include - ++ +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 +#include @@ -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 @@ -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 @@ -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 +#include @@ -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 #include @@ -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 #include #include -@@ -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 #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 #include -@@ -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 +#include @@ -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 #include @@ -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 #include -@@ -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 #include @@ -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 #include @@ -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 +#include @@ -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 +#include @@ -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 +#include @@ -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 #include @@ -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 #include -@@ -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 #include @@ -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 #include -@@ -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 #include @@ -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 #include #include -@@ -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 #include @@ -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 #include #include -@@ -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 @@ -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 #include -@@ -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 +#include @@ -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 #include @@ -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 #include -@@ -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(¤t->sighand->siglock); sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); -@@ -568,6 +568,14 @@ handle_signal(unsigned long sig, siginfo +@@ -567,6 +567,14 @@ + sigaddset(¤t->blocked, sig); recalc_sigpending(); spin_unlock_irq(¤t->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 #include @@ -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(¤t->sighand->siglock); sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); -@@ -462,6 +434,14 @@ handle_signal(unsigned long sig, siginfo +@@ -462,6 +434,14 @@ sigaddset(¤t->blocked,sig); recalc_sigpending(); spin_unlock_irq(¤t->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 #include @@ -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 #include #include -@@ -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 #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 #include #include -@@ -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 @@ -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 #include @@ -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 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 #include @@ -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 #include #include -@@ -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 +#include @@ -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 @@ -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 #include #include --#include - #include ++#include +#include -+#include + #include +-#include #include #include @@ -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 @@ -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 #include #include -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 @@ -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 #include #include --#include - #include ++#include +#include -+#include + #include +-#include #include #include #include -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 @@ -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 #include #include --#include - #include --#include - #include -+#include -+#include ++#include ++#include + #include +-#include + #include +-#include #include #include -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 +#include @@ -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<> 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 +#include @@ -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 +#include @@ -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 #include @@ -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 #include #include -@@ -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(¤t->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 #include @@ -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 @@ -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 #include #include -@@ -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 #include -@@ -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 #include @@ -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 #include -@@ -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 #include @@ -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 #include #include -@@ -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 #include @@ -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 #include @@ -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 #include #include -@@ -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 #include @@ -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 #include @@ -145027,7 +145015,7 @@ diff -purN linux-2.6.27/drivers/acpi/thermal.c linux-2.6.27.19-5.1/drivers/acpi/ #include #include #include -@@ -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 #include @@ -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 #include -@@ -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, "\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: "); if (options & 2) seq_printf(seq, " "); -@@ -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 #include #include -@@ -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 #include @@ -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, ®); ++ pci_read_config_dword(pdev, addr1, ®); ++ 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, ®); - 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 @@ -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 +#include @@ -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 #include @@ -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 /* -@@ -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 "); 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 #include @@ -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 #include @@ -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 -@@ -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 @@ -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(¤t->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 #include #include -@@ -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(®s->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 #include @@ -154430,7 +154414,7 @@ diff -purN linux-2.6.27/drivers/firewire/fw-transaction.h linux-2.6.27.19-5.1/dr #include #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 #include @@ -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 +#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 #include @@ -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 #include @@ -160880,7 +160858,7 @@ diff -purN linux-2.6.27/drivers/hwmon/dme1737.c linux-2.6.27.19-5.1/drivers/hwmo #include /* 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 #include @@ -160902,7 +160880,7 @@ diff -purN linux-2.6.27/drivers/hwmon/f71805f.c linux-2.6.27.19-5.1/drivers/hwmo #include 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 #include @@ -160924,7 +160902,7 @@ diff -purN linux-2.6.27/drivers/hwmon/f71882fg.c linux-2.6.27.19-5.1/drivers/hwm #include #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 #include @@ -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 #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 #include @@ -161042,7 +161020,7 @@ diff -purN linux-2.6.27/drivers/hwmon/pc87360.c linux-2.6.27.19-5.1/drivers/hwmo #include 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 #include @@ -161065,7 +161043,7 @@ diff -purN linux-2.6.27/drivers/hwmon/pc87427.c linux-2.6.27.19-5.1/drivers/hwmo #include 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 #include @@ -161087,7 +161065,7 @@ diff -purN linux-2.6.27/drivers/hwmon/sis5595.c linux-2.6.27.19-5.1/drivers/hwmo #include -@@ -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 #include @@ -161109,7 +161087,7 @@ diff -purN linux-2.6.27/drivers/hwmon/smsc47b397.c linux-2.6.27.19-5.1/drivers/h #include 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 #include @@ -161131,7 +161109,7 @@ diff -purN linux-2.6.27/drivers/hwmon/smsc47m1.c linux-2.6.27.19-5.1/drivers/hwm #include 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 #include @@ -161153,7 +161131,7 @@ diff -purN linux-2.6.27/drivers/hwmon/via686a.c linux-2.6.27.19-5.1/drivers/hwmo #include -@@ -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 #include @@ -161175,7 +161153,7 @@ diff -purN linux-2.6.27/drivers/hwmon/vt1211.c linux-2.6.27.19-5.1/drivers/hwmon #include 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 #include @@ -161197,7 +161175,7 @@ diff -purN linux-2.6.27/drivers/hwmon/vt8231.c linux-2.6.27.19-5.1/drivers/hwmon #include 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 #include @@ -161219,7 +161197,7 @@ diff -purN linux-2.6.27/drivers/hwmon/w83627ehf.c linux-2.6.27.19-5.1/drivers/hw #include #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 #include @@ -161242,7 +161220,7 @@ diff -purN linux-2.6.27/drivers/hwmon/w83627hf.c linux-2.6.27.19-5.1/drivers/hwm #include #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 #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 @@ +/* + * @@ -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 "); +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 "); +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 "); +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 -@@ -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 "); +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 "); +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 "); +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 #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<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<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 #include /* 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 #ifdef CONFIG_MTRR #include -@@ -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; countname, 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<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 #include -@@ -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; iifacts.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 #include @@ -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 /* for mdelay */ #include /* 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 #include -@@ -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 /* for mdelay */ #include /* 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 #include -@@ -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 "); -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 #include /* 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 -@@ -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 @@ -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 #include @@ -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 #include -@@ -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 "); +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 #include @@ -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 #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 #include @@ -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 -@@ -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 @@ -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 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 -@@ -32,17 +31,21 @@ +@@ -32,16 +31,20 @@ #include #include #include @@ -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 #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 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 @@ -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 "); -@@ -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 + * + * + * ++ * Certain parts of the driver were implemented by ++ * Alexandra Kossovsky ++ * OKTET Labs Ltd, Russia, ++ * http://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 ++ + +/*---------------------------------------------------------------------------- + * -+ * 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 ++#include ++#include + -+#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 ++ ++/*---------------------------------------------------------------------------- ++ * ++ * 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: ++ * ++ * ++ * ++ * ++ * 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: ++ * ++ * ++ * ++ * ++ * 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 ++#include ++#include ++#include ++ ++#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: -+ * -+ * -+ * -+ * -+ * 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 -+#include -+#include -+#include -+ -+#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: -+ * -+ * -+ * -+ * Certain parts of the driver were implemented by -+ * Alexandra Kossovsky -+ * OKTET Labs Ltd, Russia, -+ * http://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 -+ -+ -+/*---------------------------------------------------------------------------- -+ * -+ * Common EtherFabric definitions -+ * -+ *---------------------------------------------------------------------------*/ -+ -+#include -+#include -+#include -+ -+/*---------------------------------------------------------------------------- -+ * -+ * EtherFabric varients -+ * -+ *---------------------------------------------------------------------------*/ -+ -+#include -+ -+/*---------------------------------------------------------------------------- -+ * -+ * 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 + "") + +#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 + +#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 #include @@ -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 #include @@ -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 #include #include -@@ -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 - * ++ * + * 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 - * ++ * + * 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 -@@ -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 * Author: Anil S Keshavamurthy @@ -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 @@ -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 #include @@ -266077,7 +266005,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pci_hotplug_core.c linux-2.6.27.19-5 #include #include #include -@@ -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 #include #include -@@ -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 - 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 #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 +#include @@ -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 #include @@ -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 #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, ®16); @@ -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 #include #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 #include @@ -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 #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 * Bugreports.to..: @@ -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 #include - #include -@@ -17,21 +19,10 @@ +@@ -17,20 +19,9 @@ #include #include @@ -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 */ - -+#define KMSG_COMPONENT "monreader" + ++#define KMSG_COMPONENT "monreader" + #include #include - #include @@ -24,19 +26,6 @@ #include #include @@ -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 */ - -+#define KMSG_COMPONENT "monwriter" + ++#define KMSG_COMPONENT "monwriter" + #include #include - #include -@@ -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 , * Peter Oberparleiter */ - -+#define KMSG_COMPONENT "sclp_cmd" + ++#define KMSG_COMPONENT "sclp_cmd" + #include #include - #include @@ -16,9 +18,9 @@ #include #include #include --#include "sclp.h" +#include - ++ + #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 */ @@ -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 #include #include --#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 * Michael Ernst */ - -+#define KMSG_COMPONENT "sclp_cpi" + ++#define KMSG_COMPONENT "sclp_cpi" + #include #include - #include @@ -20,6 +22,7 @@ #include #include @@ -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 #include - #include -@@ -26,8 +28,6 @@ MODULE_LICENSE("GPL"); +@@ -25,8 +27,6 @@ + MODULE_LICENSE("GPL"); MODULE_AUTHOR("Christian Borntraeger "); 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 * @@ -273048,16 +272987,16 @@ diff -purN linux-2.6.27/drivers/s390/char/vmlogrdr.c linux-2.6.27.19-5.1/drivers #include #include #include -@@ -28,8 +31,6 @@ +@@ -27,8 +30,6 @@ + #include #include #include - - - + 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 * Frank Munzert */ - -+#define KMSG_COMPONENT "vmur" + ++#define KMSG_COMPONENT "vmur" + #include #include - -@@ -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 #include - #include @@ -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 #include - #include -@@ -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 #include - #include -@@ -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 #include - #include -@@ -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 #include - #include -@@ -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 #include #include -@@ -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 #include @@ -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 #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 #include - #include -@@ -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 #include - #include -@@ -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 #include - #include -@@ -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 #include - #include -@@ -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 #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 #include #include -@@ -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 -@@ -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 #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 , * Frank Blaschka */ - -+#define KMSG_COMPONENT "qeth" + ++#define KMSG_COMPONENT "qeth" + #include #include - #include -@@ -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 , * Frank Blaschka */ - -+#define KMSG_COMPONENT "qeth" + ++#define KMSG_COMPONENT "qeth" + #include #include - #include -@@ -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 , * Frank Blaschka */ - -+#define KMSG_COMPONENT "qeth" + ++#define KMSG_COMPONENT "qeth" + #include #include - #include -@@ -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 #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 #include - #include -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 #include - #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 - -@@ -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 @@ -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 to remote NPORT */ -@@ -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 @@ -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 +#include -+ + +/* 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 handler: portRspPut is bigger then * rsp ring -@@ -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 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 * mbxStatus -@@ -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 #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 @@ -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 + +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 - +- -/** - * 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 #include @@ -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 #include @@ -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 @@ -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 #include @@ -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 #include -@@ -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 @@ -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 #include #endif - ++ +#ifdef CONFIG_KDB +#include +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

parallel, 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 /* for mdelay */ #include @@ -335577,7 +335437,7 @@ diff -purN linux-2.6.27/drivers/serial/sn_console.c linux-2.6.27.19-5.1/drivers/ #include #include -@@ -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 +#include @@ -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 +#include @@ -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 "); +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 + and Greg Kroah-Hartman -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 and Cc: Steve +Underwood and David Rowe -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 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 and Cc: Ross +Cohen 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 and +Guenter Gebhardt + -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 -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 and +Luis Rodriguez 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 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 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 +#define __INC_DOT11D_H @@ -776863,365 +776723,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/dot11d.h linux-2.6.27.19-5.1/d +); + +#endif // #ifndef __INC_DOT11D_H -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 -+//----------------------------------------------------------------------------- -+// File: -+// Dot11d.c -+// -+// Description: -+// Implement 802.11d. -+// -+//----------------------------------------------------------------------------- -+ -+#include "dot11d.h" -+ -+void -+Dot11d_Init(struct ieee80211_device *ieee) -+{ -+ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee); -+ -+ pDot11dInfo->bEnabled = 0; -+ -+ pDot11dInfo->State = DOT11D_STATE_NONE; -+ pDot11dInfo->CountryIeLen = 0; -+ memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1); -+ memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1); -+ RESET_CIE_WATCHDOG(ieee); -+ -+ printk("Dot11d_Init()\n"); -+} -+ -+// -+// Description: -+// Reset to the state as we are just entering a regulatory domain. -+// -+void -+Dot11d_Reset(struct ieee80211_device *ieee) -+{ -+ u32 i; -+ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee); -+ -+ // Clear old channel map -+ memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1); -+ memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1); -+ // Set new channel map -+ for (i=1; i<=11; i++) { -+ (pDot11dInfo->channel_map)[i] = 1; -+ } -+ for (i=12; i<=14; i++) { -+ (pDot11dInfo->channel_map)[i] = 2; -+ } -+ -+ pDot11dInfo->State = DOT11D_STATE_NONE; -+ pDot11dInfo->CountryIeLen = 0; -+ RESET_CIE_WATCHDOG(ieee); -+ -+ //printk("Dot11d_Reset()\n"); -+} -+ -+// -+// Description: -+// Update country IE from Beacon or Probe Resopnse -+// and configure PHY for operation in the regulatory domain. -+// -+// TODO: -+// Configure Tx power. -+// -+// Assumption: -+// 1. IS_DOT11D_ENABLE() is TRUE. -+// 2. Input IE is an valid one. -+// -+void -+Dot11d_UpdateCountryIe( -+ struct ieee80211_device *dev, -+ u8 * pTaddr, -+ u16 CoutryIeLen, -+ u8 * pCoutryIe -+ ) -+{ -+ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev); -+ u8 i, j, NumTriples, MaxChnlNum; -+ PCHNL_TXPOWER_TRIPLE pTriple; -+ -+ if((CoutryIeLen - 3)%3 != 0) -+ { -+ printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n"); -+ Dot11d_Reset(dev); -+ return; -+ } -+ -+ memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1); -+ memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1); -+ MaxChnlNum = 0; -+ NumTriples = (CoutryIeLen - 3) / 3; // skip 3-byte country string. -+ pTriple = (PCHNL_TXPOWER_TRIPLE)(pCoutryIe + 3); -+ for(i = 0; i < NumTriples; i++) -+ { -+ if(MaxChnlNum >= pTriple->FirstChnl) -+ { // It is not in a monotonically increasing order, so stop processing. -+ printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n"); -+ Dot11d_Reset(dev); -+ return; -+ } -+ if(MAX_CHANNEL_NUMBER < (pTriple->FirstChnl + pTriple->NumChnls)) -+ { // It is not a valid set of channel id, so stop processing. -+ printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n"); -+ Dot11d_Reset(dev); -+ return; -+ } -+ -+ for(j = 0 ; j < pTriple->NumChnls; j++) -+ { -+ pDot11dInfo->channel_map[pTriple->FirstChnl + j] = 1; -+ pDot11dInfo->MaxTxPwrDbmList[pTriple->FirstChnl + j] = pTriple->MaxTxPowerInDbm; -+ MaxChnlNum = pTriple->FirstChnl + j; -+ } -+ -+ pTriple = (PCHNL_TXPOWER_TRIPLE)((u8*)pTriple + 3); -+ } -+#if 1 -+ //printk("Dot11d_UpdateCountryIe(): Channel List:\n"); -+ printk("Channel List:"); -+ for(i=1; i<= MAX_CHANNEL_NUMBER; i++) -+ if(pDot11dInfo->channel_map[i] > 0) -+ printk(" %d", i); -+ printk("\n"); -+#endif -+ -+ UPDATE_CIE_SRC(dev, pTaddr); -+ -+ pDot11dInfo->CountryIeLen = CoutryIeLen; -+ memcpy(pDot11dInfo->CountryIeBuf, pCoutryIe,CoutryIeLen); -+ pDot11dInfo->State = DOT11D_STATE_LEARNED; -+} -+ -+void dump_chnl_map(u8 * channel_map) -+{ -+ int i; -+ printk("Channel List:"); -+ for(i=1; i<= MAX_CHANNEL_NUMBER; i++) -+ if(channel_map[i] > 0) -+ printk(" %d(%d)", i, channel_map[i]); -+ printk("\n"); -+} -+ -+u8 -+DOT11D_GetMaxTxPwrInDbm( -+ struct ieee80211_device *dev, -+ u8 Channel -+ ) -+{ -+ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev); -+ u8 MaxTxPwrInDbm = 255; -+ -+ if(MAX_CHANNEL_NUMBER < Channel) -+ { -+ printk("DOT11D_GetMaxTxPwrInDbm(): Invalid Channel\n"); -+ return MaxTxPwrInDbm; -+ } -+ if(pDot11dInfo->channel_map[Channel]) -+ { -+ MaxTxPwrInDbm = pDot11dInfo->MaxTxPwrDbmList[Channel]; -+ } -+ -+ return MaxTxPwrInDbm; -+} -+ -+ -+void -+DOT11D_ScanComplete( -+ struct ieee80211_device * dev -+ ) -+{ -+ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev); -+ -+ switch(pDot11dInfo->State) -+ { -+ case DOT11D_STATE_LEARNED: -+ pDot11dInfo->State = DOT11D_STATE_DONE; -+ break; -+ -+ case DOT11D_STATE_DONE: -+ if( GET_CIE_WATCHDOG(dev) == 0 ) -+ { // Reset country IE if previous one is gone. -+ Dot11d_Reset(dev); -+ } -+ break; -+ case DOT11D_STATE_NONE: -+ break; -+ } -+} -+ -+int IsLegalChannel( -+ struct ieee80211_device * dev, -+ u8 channel -+) -+{ -+ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev); -+ -+ if(MAX_CHANNEL_NUMBER < channel) -+ { -+ printk("IsLegalChannel(): Invalid Channel\n"); -+ return 0; -+ } -+ if(pDot11dInfo->channel_map[channel] > 0) -+ return 1; -+ return 0; -+} -+ -+int ToLegalChannel( -+ struct ieee80211_device * dev, -+ u8 channel -+) -+{ -+ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev); -+ u8 default_chn = 0; -+ u32 i = 0; -+ -+ for (i=1; i<= MAX_CHANNEL_NUMBER; i++) -+ { -+ if(pDot11dInfo->channel_map[i] > 0) -+ { -+ default_chn = i; -+ break; -+ } -+ } -+ -+ if(MAX_CHANNEL_NUMBER < channel) -+ { -+ printk("IsLegalChannel(): Invalid Channel\n"); -+ return default_chn; -+ } -+ -+ if(pDot11dInfo->channel_map[channel] > 0) -+ return channel; -+ -+ return default_chn; -+} -+ -+#if 0 -+EXPORT_SYMBOL(Dot11d_Init); -+EXPORT_SYMBOL(Dot11d_Reset); -+EXPORT_SYMBOL(Dot11d_UpdateCountryIe); -+EXPORT_SYMBOL(DOT11D_GetMaxTxPwrInDbm); -+EXPORT_SYMBOL(DOT11D_ScanComplete); -+EXPORT_SYMBOL(IsLegalChannel); -+EXPORT_SYMBOL(ToLegalChannel); -+#endif -+#endif -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 -+#define __INC_DOT11D_H -+ -+#include "ieee80211.h" -+ -+//#define ENABLE_DOT11D -+ -+//#define DOT11D_MAX_CHNL_NUM 83 -+ -+typedef struct _CHNL_TXPOWER_TRIPLE { -+ u8 FirstChnl; -+ u8 NumChnls; -+ u8 MaxTxPowerInDbm; -+}CHNL_TXPOWER_TRIPLE, *PCHNL_TXPOWER_TRIPLE; -+ -+typedef enum _DOT11D_STATE { -+ DOT11D_STATE_NONE = 0, -+ DOT11D_STATE_LEARNED, -+ DOT11D_STATE_DONE, -+}DOT11D_STATE; -+ -+typedef struct _RT_DOT11D_INFO { -+ //DECLARE_RT_OBJECT(RT_DOT11D_INFO); -+ -+ bool bEnabled; // dot11MultiDomainCapabilityEnabled -+ -+ u16 CountryIeLen; // > 0 if CountryIeBuf[] contains valid country information element. -+ u8 CountryIeBuf[MAX_IE_LEN]; -+ u8 CountryIeSrcAddr[6]; // Source AP of the country IE. -+ u8 CountryIeWatchdog; -+ -+ u8 channel_map[MAX_CHANNEL_NUMBER+1]; //!!!Value 0: Invalid, 1: Valid (active scan), 2: Valid (passive scan) -+ //u8 ChnlListLen; // #Bytes valid in ChnlList[]. -+ //u8 ChnlList[DOT11D_MAX_CHNL_NUM]; -+ u8 MaxTxPwrDbmList[MAX_CHANNEL_NUMBER+1]; -+ -+ DOT11D_STATE State; -+}RT_DOT11D_INFO, *PRT_DOT11D_INFO; -+#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 ) -+#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]) -+#define GET_DOT11D_INFO(__pIeeeDev) ((PRT_DOT11D_INFO)((__pIeeeDev)->pDot11dInfo)) -+ -+#define IS_DOT11D_ENABLE(__pIeeeDev) GET_DOT11D_INFO(__pIeeeDev)->bEnabled -+#define IS_COUNTRY_IE_VALID(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen > 0) -+ -+#define IS_EQUAL_CIE_SRC(__pIeeeDev, __pTa) eqMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa) -+#define UPDATE_CIE_SRC(__pIeeeDev, __pTa) cpMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa) -+ -+#define IS_COUNTRY_IE_CHANGED(__pIeeeDev, __Ie) \ -+ (((__Ie).Length == 0 || (__Ie).Length != GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen) ? \ -+ FALSE : \ -+ (!memcmp(GET_DOT11D_INFO(__pIeeeDev)->CountryIeBuf, (__Ie).Octet, (__Ie).Length))) -+ -+#define CIE_WATCHDOG_TH 1 -+#define GET_CIE_WATCHDOG(__pIeeeDev) GET_DOT11D_INFO(__pIeeeDev)->CountryIeWatchdog -+#define RESET_CIE_WATCHDOG(__pIeeeDev) GET_CIE_WATCHDOG(__pIeeeDev) = 0 -+#define UPDATE_CIE_WATCHDOG(__pIeeeDev) ++GET_CIE_WATCHDOG(__pIeeeDev) -+ -+#define IS_DOT11D_STATE_DONE(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->State == DOT11D_STATE_DONE) -+ -+ -+void -+Dot11d_Init( -+ struct ieee80211_device *dev -+ ); -+ -+void -+Dot11d_Reset( -+ struct ieee80211_device *dev -+ ); -+ -+void -+Dot11d_UpdateCountryIe( -+ struct ieee80211_device *dev, -+ u8 * pTaddr, -+ u16 CoutryIeLen, -+ u8 * pCoutryIe -+ ); -+ -+u8 -+DOT11D_GetMaxTxPwrInDbm( -+ struct ieee80211_device *dev, -+ u8 Channel -+ ); -+ -+void -+DOT11D_ScanComplete( -+ struct ieee80211_device * dev -+ ); -+ -+int IsLegalChannel( -+ struct ieee80211_device * dev, -+ u8 channel -+); -+ -+int ToLegalChannel( -+ struct ieee80211_device * dev, -+ u8 channel -+); -+ -+void dump_chnl_map(u8 * channel_map); -+#endif // #ifndef __INC_DOT11D_H -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 ++//----------------------------------------------------------------------------- ++// File: ++// Dot11d.c ++// ++// Description: ++// Implement 802.11d. ++// ++//----------------------------------------------------------------------------- ++ ++#include "dot11d.h" ++ ++void ++Dot11d_Init(struct ieee80211_device *ieee) ++{ ++ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee); ++ ++ pDot11dInfo->bEnabled = 0; ++ ++ pDot11dInfo->State = DOT11D_STATE_NONE; ++ pDot11dInfo->CountryIeLen = 0; ++ memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1); ++ memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1); ++ RESET_CIE_WATCHDOG(ieee); ++ ++ printk("Dot11d_Init()\n"); ++} ++ ++// ++// Description: ++// Reset to the state as we are just entering a regulatory domain. ++// ++void ++Dot11d_Reset(struct ieee80211_device *ieee) ++{ ++ u32 i; ++ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee); ++ ++ // Clear old channel map ++ memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1); ++ memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1); ++ // Set new channel map ++ for (i=1; i<=11; i++) { ++ (pDot11dInfo->channel_map)[i] = 1; ++ } ++ for (i=12; i<=14; i++) { ++ (pDot11dInfo->channel_map)[i] = 2; ++ } ++ ++ pDot11dInfo->State = DOT11D_STATE_NONE; ++ pDot11dInfo->CountryIeLen = 0; ++ RESET_CIE_WATCHDOG(ieee); ++ ++ //printk("Dot11d_Reset()\n"); ++} ++ ++// ++// Description: ++// Update country IE from Beacon or Probe Resopnse ++// and configure PHY for operation in the regulatory domain. ++// ++// TODO: ++// Configure Tx power. ++// ++// Assumption: ++// 1. IS_DOT11D_ENABLE() is TRUE. ++// 2. Input IE is an valid one. ++// ++void ++Dot11d_UpdateCountryIe( ++ struct ieee80211_device *dev, ++ u8 * pTaddr, ++ u16 CoutryIeLen, ++ u8 * pCoutryIe ++ ) ++{ ++ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev); ++ u8 i, j, NumTriples, MaxChnlNum; ++ PCHNL_TXPOWER_TRIPLE pTriple; ++ ++ if((CoutryIeLen - 3)%3 != 0) ++ { ++ printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n"); ++ Dot11d_Reset(dev); ++ return; ++ } ++ ++ memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1); ++ memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1); ++ MaxChnlNum = 0; ++ NumTriples = (CoutryIeLen - 3) / 3; // skip 3-byte country string. ++ pTriple = (PCHNL_TXPOWER_TRIPLE)(pCoutryIe + 3); ++ for(i = 0; i < NumTriples; i++) ++ { ++ if(MaxChnlNum >= pTriple->FirstChnl) ++ { // It is not in a monotonically increasing order, so stop processing. ++ printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n"); ++ Dot11d_Reset(dev); ++ return; ++ } ++ if(MAX_CHANNEL_NUMBER < (pTriple->FirstChnl + pTriple->NumChnls)) ++ { // It is not a valid set of channel id, so stop processing. ++ printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n"); ++ Dot11d_Reset(dev); ++ return; ++ } ++ ++ for(j = 0 ; j < pTriple->NumChnls; j++) ++ { ++ pDot11dInfo->channel_map[pTriple->FirstChnl + j] = 1; ++ pDot11dInfo->MaxTxPwrDbmList[pTriple->FirstChnl + j] = pTriple->MaxTxPowerInDbm; ++ MaxChnlNum = pTriple->FirstChnl + j; ++ } ++ ++ pTriple = (PCHNL_TXPOWER_TRIPLE)((u8*)pTriple + 3); ++ } ++#if 1 ++ //printk("Dot11d_UpdateCountryIe(): Channel List:\n"); ++ printk("Channel List:"); ++ for(i=1; i<= MAX_CHANNEL_NUMBER; i++) ++ if(pDot11dInfo->channel_map[i] > 0) ++ printk(" %d", i); ++ printk("\n"); ++#endif ++ ++ UPDATE_CIE_SRC(dev, pTaddr); ++ ++ pDot11dInfo->CountryIeLen = CoutryIeLen; ++ memcpy(pDot11dInfo->CountryIeBuf, pCoutryIe,CoutryIeLen); ++ pDot11dInfo->State = DOT11D_STATE_LEARNED; ++} ++ ++void dump_chnl_map(u8 * channel_map) ++{ ++ int i; ++ printk("Channel List:"); ++ for(i=1; i<= MAX_CHANNEL_NUMBER; i++) ++ if(channel_map[i] > 0) ++ printk(" %d(%d)", i, channel_map[i]); ++ printk("\n"); ++} ++ ++u8 ++DOT11D_GetMaxTxPwrInDbm( ++ struct ieee80211_device *dev, ++ u8 Channel ++ ) ++{ ++ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev); ++ u8 MaxTxPwrInDbm = 255; ++ ++ if(MAX_CHANNEL_NUMBER < Channel) ++ { ++ printk("DOT11D_GetMaxTxPwrInDbm(): Invalid Channel\n"); ++ return MaxTxPwrInDbm; ++ } ++ if(pDot11dInfo->channel_map[Channel]) ++ { ++ MaxTxPwrInDbm = pDot11dInfo->MaxTxPwrDbmList[Channel]; ++ } ++ ++ return MaxTxPwrInDbm; ++} ++ ++ ++void ++DOT11D_ScanComplete( ++ struct ieee80211_device * dev ++ ) ++{ ++ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev); ++ ++ switch(pDot11dInfo->State) ++ { ++ case DOT11D_STATE_LEARNED: ++ pDot11dInfo->State = DOT11D_STATE_DONE; ++ break; ++ ++ case DOT11D_STATE_DONE: ++ if( GET_CIE_WATCHDOG(dev) == 0 ) ++ { // Reset country IE if previous one is gone. ++ Dot11d_Reset(dev); ++ } ++ break; ++ case DOT11D_STATE_NONE: ++ break; ++ } ++} ++ ++int IsLegalChannel( ++ struct ieee80211_device * dev, ++ u8 channel ++) ++{ ++ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev); ++ ++ if(MAX_CHANNEL_NUMBER < channel) ++ { ++ printk("IsLegalChannel(): Invalid Channel\n"); ++ return 0; ++ } ++ if(pDot11dInfo->channel_map[channel] > 0) ++ return 1; ++ return 0; ++} ++ ++int ToLegalChannel( ++ struct ieee80211_device * dev, ++ u8 channel ++) ++{ ++ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev); ++ u8 default_chn = 0; ++ u32 i = 0; ++ ++ for (i=1; i<= MAX_CHANNEL_NUMBER; i++) ++ { ++ if(pDot11dInfo->channel_map[i] > 0) ++ { ++ default_chn = i; ++ break; ++ } ++ } ++ ++ if(MAX_CHANNEL_NUMBER < channel) ++ { ++ printk("IsLegalChannel(): Invalid Channel\n"); ++ return default_chn; ++ } ++ ++ if(pDot11dInfo->channel_map[channel] > 0) ++ return channel; ++ ++ return default_chn; ++} ++ ++#if 0 ++EXPORT_SYMBOL(Dot11d_Init); ++EXPORT_SYMBOL(Dot11d_Reset); ++EXPORT_SYMBOL(Dot11d_UpdateCountryIe); ++EXPORT_SYMBOL(DOT11D_GetMaxTxPwrInDbm); ++EXPORT_SYMBOL(DOT11D_ScanComplete); ++EXPORT_SYMBOL(IsLegalChannel); ++EXPORT_SYMBOL(ToLegalChannel); ++#endif ++#endif +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 ++#define __INC_DOT11D_H ++ ++#include "ieee80211.h" ++ ++//#define ENABLE_DOT11D ++ ++//#define DOT11D_MAX_CHNL_NUM 83 ++ ++typedef struct _CHNL_TXPOWER_TRIPLE { ++ u8 FirstChnl; ++ u8 NumChnls; ++ u8 MaxTxPowerInDbm; ++}CHNL_TXPOWER_TRIPLE, *PCHNL_TXPOWER_TRIPLE; ++ ++typedef enum _DOT11D_STATE { ++ DOT11D_STATE_NONE = 0, ++ DOT11D_STATE_LEARNED, ++ DOT11D_STATE_DONE, ++}DOT11D_STATE; ++ ++typedef struct _RT_DOT11D_INFO { ++ //DECLARE_RT_OBJECT(RT_DOT11D_INFO); ++ ++ bool bEnabled; // dot11MultiDomainCapabilityEnabled ++ ++ u16 CountryIeLen; // > 0 if CountryIeBuf[] contains valid country information element. ++ u8 CountryIeBuf[MAX_IE_LEN]; ++ u8 CountryIeSrcAddr[6]; // Source AP of the country IE. ++ u8 CountryIeWatchdog; ++ ++ u8 channel_map[MAX_CHANNEL_NUMBER+1]; //!!!Value 0: Invalid, 1: Valid (active scan), 2: Valid (passive scan) ++ //u8 ChnlListLen; // #Bytes valid in ChnlList[]. ++ //u8 ChnlList[DOT11D_MAX_CHNL_NUM]; ++ u8 MaxTxPwrDbmList[MAX_CHANNEL_NUMBER+1]; ++ ++ DOT11D_STATE State; ++}RT_DOT11D_INFO, *PRT_DOT11D_INFO; ++#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 ) ++#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]) ++#define GET_DOT11D_INFO(__pIeeeDev) ((PRT_DOT11D_INFO)((__pIeeeDev)->pDot11dInfo)) ++ ++#define IS_DOT11D_ENABLE(__pIeeeDev) GET_DOT11D_INFO(__pIeeeDev)->bEnabled ++#define IS_COUNTRY_IE_VALID(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen > 0) ++ ++#define IS_EQUAL_CIE_SRC(__pIeeeDev, __pTa) eqMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa) ++#define UPDATE_CIE_SRC(__pIeeeDev, __pTa) cpMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa) ++ ++#define IS_COUNTRY_IE_CHANGED(__pIeeeDev, __Ie) \ ++ (((__Ie).Length == 0 || (__Ie).Length != GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen) ? \ ++ FALSE : \ ++ (!memcmp(GET_DOT11D_INFO(__pIeeeDev)->CountryIeBuf, (__Ie).Octet, (__Ie).Length))) ++ ++#define CIE_WATCHDOG_TH 1 ++#define GET_CIE_WATCHDOG(__pIeeeDev) GET_DOT11D_INFO(__pIeeeDev)->CountryIeWatchdog ++#define RESET_CIE_WATCHDOG(__pIeeeDev) GET_CIE_WATCHDOG(__pIeeeDev) = 0 ++#define UPDATE_CIE_WATCHDOG(__pIeeeDev) ++GET_CIE_WATCHDOG(__pIeeeDev) ++ ++#define IS_DOT11D_STATE_DONE(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->State == DOT11D_STATE_DONE) ++ ++ ++void ++Dot11d_Init( ++ struct ieee80211_device *dev ++ ); ++ ++void ++Dot11d_Reset( ++ struct ieee80211_device *dev ++ ); ++ ++void ++Dot11d_UpdateCountryIe( ++ struct ieee80211_device *dev, ++ u8 * pTaddr, ++ u16 CoutryIeLen, ++ u8 * pCoutryIe ++ ); ++ ++u8 ++DOT11D_GetMaxTxPwrInDbm( ++ struct ieee80211_device *dev, ++ u8 Channel ++ ); ++ ++void ++DOT11D_ScanComplete( ++ struct ieee80211_device * dev ++ ); ++ ++int IsLegalChannel( ++ struct ieee80211_device * dev, ++ u8 channel ++); ++ ++int ToLegalChannel( ++ struct ieee80211_device * dev, ++ u8 channel ++); ++ ++void dump_chnl_map(u8 * channel_map); ++#endif // #ifndef __INC_DOT11D_H +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 ++ * ++ * Copyright (c) 2002-2003, Jouni Malinen ++ * ++ * Adaption to a generic IEEE 802.11 stack by James Ketrenos ++ * ++ * Copyright (c) 2004, Intel Corporation ++ * ++ * Modified for Realtek's wi-fi cards by Andrea Merello ++ * ++ * ++ * 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 /* ETH_ALEN */ ++#include /* ARRAY_SIZE */ ++#include ++#include ++#include ++#include ++ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)) ++#include ++#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 ++#include ++#include /* ARPHRD_ETHER */ ++ ++#ifndef WIRELESS_SPY ++#define WIRELESS_SPY // enable iwspy support ++#endif ++#include // 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, "", sizeof("")); ++ 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 @@ -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 @@ -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 -+ * -+ * Copyright (c) 2002-2003, Jouni Malinen -+ * -+ * Adaption to a generic IEEE 802.11 stack by James Ketrenos -+ * -+ * Copyright (c) 2004, Intel Corporation -+ * -+ * Modified for Realtek's wi-fi cards by Andrea Merello -+ * -+ * -+ * 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 /* ETH_ALEN */ -+#include /* ARRAY_SIZE */ -+#include -+#include -+#include -+#include -+ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)) -+#include -+#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 -+#include -+#include /* ARPHRD_ETHER */ -+ -+#ifndef WIRELESS_SPY -+#define WIRELESS_SPY // enable iwspy support -+#endif -+#include // 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, "", sizeof("")); -+ 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<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 and Christopher Harrer + 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 +#include @@ -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 +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 -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 and +Pavel Machek -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 @@ -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 -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 + #ifndef CONFIG_PCI + #error "This file is PCI bus glue. CONFIG_PCI must be defined." +#endif + - /*-------------------------------------------------------------------------*/ ++#ifdef CONFIG_KDB_USB ++#include + #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 #include - ++ +#ifdef CONFIG_KDB_USB +#include +#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 #include @@ -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 +#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 , and don't forget to CC: the + * USB development list and the USB storage list * - */ - ++ */ ++ +/* 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 */ - UNUSUAL_DEV( 0x03eb, 0x2002, 0x0100, 0x0100, -@@ -160,13 +167,6 @@ UNUSUAL_DEV( 0x0421, 0x0019, 0x0592, 0x + + /* patch submitted by Vivian Bregier +@@ -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 */ 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 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 -@@ -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 * 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 */ +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 */ - 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 */ +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 */ +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 */ - 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 */ @@ -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 . * 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 */ -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 * 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 * 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 * and Renato Perini - */ -@@ -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 */ 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 #include