From: Greg Kroah-Hartman Date: Wed, 7 Mar 2007 01:44:33 +0000 (-0800) Subject: more 2.6.20-stable patches added X-Git-Tag: v2.6.20.2~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1bbce966525aa60004c07c644337068ae8232f5d;p=thirdparty%2Fkernel%2Fstable-queue.git more 2.6.20-stable patches added --- diff --git a/queue-2.6.20/bcm43xx-fix-assertion-failures-in-interrupt-handler.patch b/queue-2.6.20/bcm43xx-fix-assertion-failures-in-interrupt-handler.patch new file mode 100644 index 00000000000..e4379cb09a6 --- /dev/null +++ b/queue-2.6.20/bcm43xx-fix-assertion-failures-in-interrupt-handler.patch @@ -0,0 +1,44 @@ +From stable-bounces@linux.kernel.org Mon Mar 5 17:29:50 2007 +From: Pavel Roskin +Date: Mon, 05 Mar 2007 19:28:00 -0600 +Subject: bcm43xx: Fix assertion failures in interrupt handler +To: stable@kernel.org +Cc: linux-wireless@vger.kernel.org, Bcm43xx-dev@lists.berlios.de, Michael Buesch +Message-ID: <45ecc3a0.8we8IxI7lp6G5Y6l%Larry.Finger@lwfinger.net> + + +From: Pavel Roskin + +In the bcm43xx interrupt handler, sanity checks are wrongly done before the +verification that the interrupt is for the bcm43xx. + +Signed-off-by: Pavel Roskin +Signed-off-by: Larry Finger +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/bcm43xx/bcm43xx_main.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- linux-2.6.20.1.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c ++++ linux-2.6.20.1/drivers/net/wireless/bcm43xx/bcm43xx_main.c +@@ -1864,9 +1864,6 @@ static irqreturn_t bcm43xx_interrupt_han + + spin_lock(&bcm->irq_lock); + +- assert(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED); +- assert(bcm->current_core->id == BCM43xx_COREID_80211); +- + reason = bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); + if (reason == 0xffffffff) { + /* irq not for us (shared irq) */ +@@ -1877,6 +1874,9 @@ static irqreturn_t bcm43xx_interrupt_han + if (!reason) + goto out; + ++ assert(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED); ++ assert(bcm->current_core->id == BCM43xx_COREID_80211); ++ + bcm->dma_reason[0] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA0_REASON) + & 0x0001DC00; + bcm->dma_reason[1] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA1_REASON) diff --git a/queue-2.6.20/don-t-add-anycast-reference-to-device-multiple-times.patch b/queue-2.6.20/don-t-add-anycast-reference-to-device-multiple-times.patch new file mode 100644 index 00000000000..654bfc834e5 --- /dev/null +++ b/queue-2.6.20/don-t-add-anycast-reference-to-device-multiple-times.patch @@ -0,0 +1,36 @@ +From stable-bounces@linux.kernel.org Tue Feb 27 11:14:04 2007 +From: Michal Wrobel +Date: Tue, 27 Feb 2007 11:12:45 -0800 (PST) +Subject: Don't add anycast reference to device multiple times +To: stable@kernel.org +Cc: bunk@stusta.de +Message-ID: <20070227.111245.26276999.davem@davemloft.net> + +From: Michal Wrobel + +[IPV6]: anycast refcnt fix + +This patch fixes a bug in Linux IPv6 stack which caused anycast address +to be added to a device prior DAD has been completed. This led to +incorrect reference count which resulted in infinite wait for +unregister_netdevice completion on interface removal. + +Signed-off-by: Michal Wrobel +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + net/ipv6/addrconf.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- linux-2.6.20.1.orig/net/ipv6/addrconf.c ++++ linux-2.6.20.1/net/ipv6/addrconf.c +@@ -469,6 +469,8 @@ static void dev_forward_change(struct in + ipv6_dev_mc_dec(dev, &addr); + } + for (ifa=idev->addr_list; ifa; ifa=ifa->if_next) { ++ if (ifa->flags&IFA_F_TENTATIVE) ++ continue; + if (idev->cnf.forwarding) + addrconf_join_anycast(ifa); + else diff --git a/queue-2.6.20/fix-100-cpu-spinning-on-sparc64.patch b/queue-2.6.20/fix-100-cpu-spinning-on-sparc64.patch new file mode 100644 index 00000000000..6f6482b318b --- /dev/null +++ b/queue-2.6.20/fix-100-cpu-spinning-on-sparc64.patch @@ -0,0 +1,58 @@ +From stable-bounces@linux.kernel.org Tue Feb 27 11:11:27 2007 +From: David Miller +Date: Tue, 27 Feb 2007 11:10:07 -0800 (PST) +Subject: Fix %100 cpu spinning on sparc64 +To: stable@kernel.org +Cc: bunk@stusta.de +Message-ID: <20070227.111007.35014930.davem@davemloft.net> + +From: David Miller + +[SPARC64] bbc_i2c: Fix kenvctrld eating %100 cpu. + +Based almost entirely upon a patch by Joerg Friedrich + +Signed-off-by: David S. Miller + +--- + drivers/sbus/char/bbc_i2c.c | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +--- linux-2.6.20.1.orig/drivers/sbus/char/bbc_i2c.c ++++ linux-2.6.20.1/drivers/sbus/char/bbc_i2c.c +@@ -187,19 +187,20 @@ static int wait_for_pin(struct bbc_i2c_b + bp->waiting = 1; + add_wait_queue(&bp->wq, &wait); + while (limit-- > 0) { +- u8 val; ++ unsigned long val; + +- set_current_state(TASK_INTERRUPTIBLE); +- *status = val = readb(bp->i2c_control_regs + 0); +- if ((val & I2C_PCF_PIN) == 0) { ++ val = wait_event_interruptible_timeout( ++ bp->wq, ++ (((*status = readb(bp->i2c_control_regs + 0)) ++ & I2C_PCF_PIN) == 0), ++ msecs_to_jiffies(250)); ++ if (val > 0) { + ret = 0; + break; + } +- msleep_interruptible(250); + } + remove_wait_queue(&bp->wq, &wait); + bp->waiting = 0; +- current->state = TASK_RUNNING; + + return ret; + } +@@ -340,7 +341,7 @@ static irqreturn_t bbc_i2c_interrupt(int + */ + if (bp->waiting && + !(readb(bp->i2c_control_regs + 0x0) & I2C_PCF_PIN)) +- wake_up(&bp->wq); ++ wake_up_interruptible(&bp->wq); + + return IRQ_HANDLED; + } diff --git a/queue-2.6.20/fix-anycast-procfs-device-leak.patch b/queue-2.6.20/fix-anycast-procfs-device-leak.patch new file mode 100644 index 00000000000..48954d0680e --- /dev/null +++ b/queue-2.6.20/fix-anycast-procfs-device-leak.patch @@ -0,0 +1,36 @@ +From stable-bounces@linux.kernel.org Tue Feb 27 11:15:20 2007 +From: David Stevens +Date: Tue, 27 Feb 2007 11:14:00 -0800 (PST) +Subject: Fix anycast procfs device leak +To: stable@kernel.org +Cc: bunk@stusta.de +Message-ID: <20070227.111400.17864504.davem@davemloft.net> + +From: David Stevens + +[IPV6]: /proc/net/anycast6 unbalanced inet6_dev refcnt + +From: David Stevens + +Reading /proc/net/anycast6 when there is no anycast address +on an interface results in an ever-increasing inet6_dev reference +count, as well as a reference to the netdevice you can't get rid of. + +From: David Stevens +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + net/ipv6/anycast.c | 1 + + 1 file changed, 1 insertion(+) + +--- linux-2.6.20.1.orig/net/ipv6/anycast.c ++++ linux-2.6.20.1/net/ipv6/anycast.c +@@ -462,6 +462,7 @@ static inline struct ifacaddr6 *ac6_get_ + break; + } + read_unlock_bh(&idev->lock); ++ in6_dev_put(idev); + } + return im; + } diff --git a/queue-2.6.20/fix-interrupt-probing-on-e450-sparc64-systems.patch b/queue-2.6.20/fix-interrupt-probing-on-e450-sparc64-systems.patch new file mode 100644 index 00000000000..a9a1d4cff86 --- /dev/null +++ b/queue-2.6.20/fix-interrupt-probing-on-e450-sparc64-systems.patch @@ -0,0 +1,85 @@ +From stable-bounces@linux.kernel.org Tue Feb 27 11:03:05 2007 +From: David Miller +Date: Tue, 27 Feb 2007 11:01:38 -0800 (PST) +Subject: Fix interrupt probing on E450 sparc64 systems +To: stable@kernel.org +Cc: fabbione@ubuntu.com, bunk@stusta.de +Message-ID: <20070227.110138.23013918.davem@davemloft.net> + +From: David Miller + +[SPARC64]: Fix PCI interrupts on E450 et al. + +When the PCI controller OBP node lacks an interrupt-map +and interrupt-map-mask property, we need to form the +INO by hand. The PCI swizzle logic was not doing that +properly. + +This was a regression added by the of_device code. + +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + arch/sparc64/kernel/of_device.c | 40 ++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 38 insertions(+), 2 deletions(-) + +--- linux-2.6.20.1.orig/arch/sparc64/kernel/of_device.c ++++ linux-2.6.20.1/arch/sparc64/kernel/of_device.c +@@ -708,7 +708,7 @@ static unsigned int __init pci_irq_swizz + unsigned int irq) + { + struct linux_prom_pci_registers *regs; +- unsigned int devfn, slot, ret; ++ unsigned int bus, devfn, slot, ret; + + if (irq < 1 || irq > 4) + return irq; +@@ -717,10 +717,46 @@ static unsigned int __init pci_irq_swizz + if (!regs) + return irq; + ++ bus = (regs->phys_hi >> 16) & 0xff; + devfn = (regs->phys_hi >> 8) & 0xff; + slot = (devfn >> 3) & 0x1f; + +- ret = ((irq - 1 + (slot & 3)) & 3) + 1; ++ if (pp->irq_trans) { ++ /* Derived from Table 8-3, U2P User's Manual. This branch ++ * is handling a PCI controller that lacks a proper set of ++ * interrupt-map and interrupt-map-mask properties. The ++ * Ultra-E450 is one example. ++ * ++ * The bit layout is BSSLL, where: ++ * B: 0 on bus A, 1 on bus B ++ * D: 2-bit slot number, derived from PCI device number as ++ * (dev - 1) for bus A, or (dev - 2) for bus B ++ * L: 2-bit line number ++ * ++ * Actually, more "portable" way to calculate the funky ++ * slot number is to subtract pbm->pci_first_slot from the ++ * device number, and that's exactly what the pre-OF ++ * sparc64 code did, but we're building this stuff generically ++ * using the OBP tree, not in the PCI controller layer. ++ */ ++ if (bus & 0x80) { ++ /* PBM-A */ ++ bus = 0x00; ++ slot = (slot - 1) << 2; ++ } else { ++ /* PBM-B */ ++ bus = 0x10; ++ slot = (slot - 2) << 2; ++ } ++ irq -= 1; ++ ++ ret = (bus | slot | irq); ++ } else { ++ /* Going through a PCI-PCI bridge that lacks a set of ++ * interrupt-map and interrupt-map-mask properties. ++ */ ++ ret = ((irq - 1 + (slot & 3)) & 3) + 1; ++ } + + return ret; + } diff --git a/queue-2.6.20/fix-skb-data-reallocation-handling-in-ipsec.patch b/queue-2.6.20/fix-skb-data-reallocation-handling-in-ipsec.patch new file mode 100644 index 00000000000..fa0c913f936 --- /dev/null +++ b/queue-2.6.20/fix-skb-data-reallocation-handling-in-ipsec.patch @@ -0,0 +1,34 @@ +From stable-bounces@linux.kernel.org Tue Feb 27 11:10:02 2007 +From: Arnaldo Carvalho de Melo +Date: Tue, 27 Feb 2007 11:08:33 -0800 (PST) +Subject: Fix skb data reallocation handling in IPSEC +To: stable@kernel.org +Cc: bunk@stusta.de +Message-ID: <20070227.110833.38710283.davem@davemloft.net> + +From: Arnaldo Carvalho de Melo + +[XFRM_TUNNEL]: Reload header pointer after pskb_may_pull/pskb_expand_head + +Please consider applying, this was found on your latest +net-2.6 tree while playing around with that ip_hdr() + turn +skb->nh/h/mac pointers as offsets on 64 bits idea :-) + +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + net/ipv4/xfrm4_mode_tunnel.c | 1 + + 1 file changed, 1 insertion(+) + +--- linux-2.6.20.1.orig/net/ipv4/xfrm4_mode_tunnel.c ++++ linux-2.6.20.1/net/ipv4/xfrm4_mode_tunnel.c +@@ -84,6 +84,7 @@ static int xfrm4_tunnel_input(struct xfr + (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC))) + goto out; + ++ iph = skb->nh.iph; + if (x->props.flags & XFRM_STATE_DECAP_DSCP) + ipv4_copy_dscp(iph, skb->h.ipiph); + if (!(x->props.flags & XFRM_STATE_NOECN)) diff --git a/queue-2.6.20/fix-tcp-md5-locking.patch b/queue-2.6.20/fix-tcp-md5-locking.patch new file mode 100644 index 00000000000..01d5fe869d1 --- /dev/null +++ b/queue-2.6.20/fix-tcp-md5-locking.patch @@ -0,0 +1,100 @@ +From stable-bounces@linux.kernel.org Tue Feb 27 11:12:34 2007 +From: David Miller +Date: Tue, 27 Feb 2007 11:11:09 -0800 (PST) +Subject: Fix TCP MD5 locking. +To: stable@kernel.org +Cc: bunk@stusta.de +Message-ID: <20070227.111109.18290176.davem@davemloft.net> + +From: David Miller + +[TCP]: Fix MD5 signature pool locking. + +The locking calls assumed that these code paths were only +invoked in software interrupt context, but that isn't true. + +Therefore we need to use spin_{lock,unlock}_bh() throughout. + +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + net/ipv4/tcp.c | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +--- linux-2.6.20.1.orig/net/ipv4/tcp.c ++++ linux-2.6.20.1/net/ipv4/tcp.c +@@ -2266,12 +2266,12 @@ void tcp_free_md5sig_pool(void) + { + struct tcp_md5sig_pool **pool = NULL; + +- spin_lock(&tcp_md5sig_pool_lock); ++ spin_lock_bh(&tcp_md5sig_pool_lock); + if (--tcp_md5sig_users == 0) { + pool = tcp_md5sig_pool; + tcp_md5sig_pool = NULL; + } +- spin_unlock(&tcp_md5sig_pool_lock); ++ spin_unlock_bh(&tcp_md5sig_pool_lock); + if (pool) + __tcp_free_md5sig_pool(pool); + } +@@ -2314,36 +2314,36 @@ struct tcp_md5sig_pool **tcp_alloc_md5si + int alloc = 0; + + retry: +- spin_lock(&tcp_md5sig_pool_lock); ++ spin_lock_bh(&tcp_md5sig_pool_lock); + pool = tcp_md5sig_pool; + if (tcp_md5sig_users++ == 0) { + alloc = 1; +- spin_unlock(&tcp_md5sig_pool_lock); ++ spin_unlock_bh(&tcp_md5sig_pool_lock); + } else if (!pool) { + tcp_md5sig_users--; +- spin_unlock(&tcp_md5sig_pool_lock); ++ spin_unlock_bh(&tcp_md5sig_pool_lock); + cpu_relax(); + goto retry; + } else +- spin_unlock(&tcp_md5sig_pool_lock); ++ spin_unlock_bh(&tcp_md5sig_pool_lock); + + if (alloc) { + /* we cannot hold spinlock here because this may sleep. */ + struct tcp_md5sig_pool **p = __tcp_alloc_md5sig_pool(); +- spin_lock(&tcp_md5sig_pool_lock); ++ spin_lock_bh(&tcp_md5sig_pool_lock); + if (!p) { + tcp_md5sig_users--; +- spin_unlock(&tcp_md5sig_pool_lock); ++ spin_unlock_bh(&tcp_md5sig_pool_lock); + return NULL; + } + pool = tcp_md5sig_pool; + if (pool) { + /* oops, it has already been assigned. */ +- spin_unlock(&tcp_md5sig_pool_lock); ++ spin_unlock_bh(&tcp_md5sig_pool_lock); + __tcp_free_md5sig_pool(p); + } else { + tcp_md5sig_pool = pool = p; +- spin_unlock(&tcp_md5sig_pool_lock); ++ spin_unlock_bh(&tcp_md5sig_pool_lock); + } + } + return pool; +@@ -2354,11 +2354,11 @@ EXPORT_SYMBOL(tcp_alloc_md5sig_pool); + struct tcp_md5sig_pool *__tcp_get_md5sig_pool(int cpu) + { + struct tcp_md5sig_pool **p; +- spin_lock(&tcp_md5sig_pool_lock); ++ spin_lock_bh(&tcp_md5sig_pool_lock); + p = tcp_md5sig_pool; + if (p) + tcp_md5sig_users++; +- spin_unlock(&tcp_md5sig_pool_lock); ++ spin_unlock_bh(&tcp_md5sig_pool_lock); + return (p ? *per_cpu_ptr(p, cpu) : NULL); + } + diff --git a/queue-2.6.20/fix-xfrm_add_sa_expire-return-value.patch b/queue-2.6.20/fix-xfrm_add_sa_expire-return-value.patch new file mode 100644 index 00000000000..9aa4da7bfe8 --- /dev/null +++ b/queue-2.6.20/fix-xfrm_add_sa_expire-return-value.patch @@ -0,0 +1,49 @@ +From stable-bounces@linux.kernel.org Tue Feb 27 11:05:48 2007 +From: David Miller +Date: Tue, 27 Feb 2007 11:04:27 -0800 (PST) +Subject: Fix xfrm_add_sa_expire() return value +To: stable@kernel.org +Cc: bunk@stusta.de +Message-ID: <20070227.110427.35664416.davem@davemloft.net> + +From: David Miller + +[XFRM] xfrm_user: Fix return values of xfrm_add_sa_expire. + +As noted by Kent Yoder, this function will always return an +error. Make sure it returns zero on success. + +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + net/xfrm/xfrm_user.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- linux-2.6.20.1.orig/net/xfrm/xfrm_user.c ++++ linux-2.6.20.1/net/xfrm/xfrm_user.c +@@ -1557,14 +1557,13 @@ static int xfrm_add_sa_expire(struct sk_ + struct xfrm_usersa_info *p = &ue->state; + + x = xfrm_state_lookup(&p->id.daddr, p->id.spi, p->id.proto, p->family); +- err = -ENOENT; + ++ err = -ENOENT; + if (x == NULL) + return err; + +- err = -EINVAL; +- + spin_lock_bh(&x->lock); ++ err = -EINVAL; + if (x->km.state != XFRM_STATE_VALID) + goto out; + km_state_expired(x, ue->hard, current->pid); +@@ -1574,6 +1573,7 @@ static int xfrm_add_sa_expire(struct sk_ + xfrm_audit_log(NETLINK_CB(skb).loginuid, NETLINK_CB(skb).sid, + AUDIT_MAC_IPSEC_DELSA, 1, NULL, x); + } ++ err = 0; + out: + spin_unlock_bh(&x->lock); + xfrm_state_put(x); diff --git a/queue-2.6.20/hid-fix-possible-double-free-on-error-path-in-hid-parser.patch b/queue-2.6.20/hid-fix-possible-double-free-on-error-path-in-hid-parser.patch new file mode 100644 index 00000000000..77bb4b2dd7e --- /dev/null +++ b/queue-2.6.20/hid-fix-possible-double-free-on-error-path-in-hid-parser.patch @@ -0,0 +1,66 @@ +From stable-bounces@linux.kernel.org Thu Mar 1 03:02:37 2007 +From: Jiri Kosina +Date: Thu, 1 Mar 2007 12:02:52 +0100 (CET) +Subject: HID: fix possible double-free on error path in hid parser +To: stable@kernel.org +Message-ID: + + +From: Jiri Kosina + +HID: fix possible double-free on error path in hid parser + +Freeing of device->collection is properly done in hid_free_device() (as +this function is supposed to free all the device resources and could be +called from transport specific code, e.g. usb_hid_configure()). + +Remove all kfree() calls preceeding the hid_free_device() call. + +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hid/hid-core.c | 5 ----- + 1 file changed, 5 deletions(-) + +--- linux-2.6.20.1.orig/drivers/hid/hid-core.c ++++ linux-2.6.20.1/drivers/hid/hid-core.c +@@ -670,7 +670,6 @@ struct hid_device *hid_parse_report(__u8 + + if (item.format != HID_ITEM_FORMAT_SHORT) { + dbg("unexpected long global item"); +- kfree(device->collection); + hid_free_device(device); + kfree(parser); + return NULL; +@@ -679,7 +678,6 @@ struct hid_device *hid_parse_report(__u8 + if (dispatch_type[item.type](parser, &item)) { + dbg("item %u %u %u %u parsing failed\n", + item.format, (unsigned)item.size, (unsigned)item.type, (unsigned)item.tag); +- kfree(device->collection); + hid_free_device(device); + kfree(parser); + return NULL; +@@ -688,14 +686,12 @@ struct hid_device *hid_parse_report(__u8 + if (start == end) { + if (parser->collection_stack_ptr) { + dbg("unbalanced collection at end of report description"); +- kfree(device->collection); + hid_free_device(device); + kfree(parser); + return NULL; + } + if (parser->local.delimiter_depth) { + dbg("unbalanced delimiter at end of report description"); +- kfree(device->collection); + hid_free_device(device); + kfree(parser); + return NULL; +@@ -706,7 +702,6 @@ struct hid_device *hid_parse_report(__u8 + } + + dbg("item fetching failed at offset %d\n", (int)(end - start)); +- kfree(device->collection); + hid_free_device(device); + kfree(parser); + return NULL; diff --git a/queue-2.6.20/libata-add-missing-config_pm-in-llds.patch b/queue-2.6.20/libata-add-missing-config_pm-in-llds.patch new file mode 100644 index 00000000000..38b45a0b31e --- /dev/null +++ b/queue-2.6.20/libata-add-missing-config_pm-in-llds.patch @@ -0,0 +1,1094 @@ +From stable-bounces@linux.kernel.org Fri Mar 2 00:48:10 2007 +From: Tejun Heo +Date: Fri, 2 Mar 2007 17:46:49 +0900 +Subject: libata: add missing CONFIG_PM in LLDs +To: Guennadi Liakhovetski +Cc: , stable@kernel.org, Alan +Message-ID: <20070302084649.GO20322@htj.dyndns.org> + +From: Tejun Heo + +Add missing #ifdef CONFIG_PM conditionals around all PM related parts +in libata LLDs. + +Signed-off-by: Tejun Heo +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ata/ahci.c | 14 ++++++++++++++ + drivers/ata/ata_generic.c | 4 ++++ + drivers/ata/ata_piix.c | 4 ++++ + drivers/ata/pata_ali.c | 6 ++++++ + drivers/ata/pata_amd.c | 6 ++++++ + drivers/ata/pata_atiixp.c | 4 ++++ + drivers/ata/pata_cmd64x.c | 6 ++++++ + drivers/ata/pata_cs5520.c | 7 +++++++ + drivers/ata/pata_cs5530.c | 6 ++++++ + drivers/ata/pata_cs5535.c | 4 ++++ + drivers/ata/pata_cypress.c | 4 ++++ + drivers/ata/pata_efar.c | 4 ++++ + drivers/ata/pata_hpt366.c | 7 ++++++- + drivers/ata/pata_hpt3x3.c | 6 ++++++ + drivers/ata/pata_it821x.c | 6 ++++++ + drivers/ata/pata_jmicron.c | 4 ++++ + drivers/ata/pata_marvell.c | 4 ++++ + drivers/ata/pata_mpiix.c | 4 ++++ + drivers/ata/pata_netcell.c | 4 ++++ + drivers/ata/pata_ns87410.c | 4 ++++ + drivers/ata/pata_oldpiix.c | 4 ++++ + drivers/ata/pata_opti.c | 4 ++++ + drivers/ata/pata_optidma.c | 4 ++++ + drivers/ata/pata_pdc202xx_old.c | 4 ++++ + drivers/ata/pata_radisys.c | 4 ++++ + drivers/ata/pata_rz1000.c | 6 ++++++ + drivers/ata/pata_sc1200.c | 4 ++++ + drivers/ata/pata_serverworks.c | 6 ++++++ + drivers/ata/pata_sil680.c | 4 ++++ + drivers/ata/pata_sis.c | 4 ++++ + drivers/ata/pata_triflex.c | 4 ++++ + drivers/ata/pata_via.c | 6 ++++++ + drivers/ata/sata_sil.c | 2 ++ + drivers/ata/sata_sil24.c | 2 ++ + 34 files changed, 165 insertions(+), 1 deletion(-) + +--- linux-2.6.20.1.orig/drivers/ata/ahci.c ++++ linux-2.6.20.1/drivers/ata/ahci.c +@@ -225,10 +225,12 @@ static void ahci_thaw(struct ata_port *a + static void ahci_error_handler(struct ata_port *ap); + static void ahci_vt8251_error_handler(struct ata_port *ap); + static void ahci_post_internal_cmd(struct ata_queued_cmd *qc); ++#ifdef CONFIG_PM + static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg); + static int ahci_port_resume(struct ata_port *ap); + static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); + static int ahci_pci_device_resume(struct pci_dev *pdev); ++#endif + static void ahci_remove_one (struct pci_dev *pdev); + + static struct scsi_host_template ahci_sht = { +@@ -248,8 +250,10 @@ static struct scsi_host_template ahci_sh + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .suspend = ata_scsi_device_suspend, + .resume = ata_scsi_device_resume, ++#endif + }; + + static const struct ata_port_operations ahci_ops = { +@@ -276,8 +280,10 @@ static const struct ata_port_operations + .error_handler = ahci_error_handler, + .post_internal_cmd = ahci_post_internal_cmd, + ++#ifdef CONFIG_PM + .port_suspend = ahci_port_suspend, + .port_resume = ahci_port_resume, ++#endif + + .port_start = ahci_port_start, + .port_stop = ahci_port_stop, +@@ -307,8 +313,10 @@ static const struct ata_port_operations + .error_handler = ahci_vt8251_error_handler, + .post_internal_cmd = ahci_post_internal_cmd, + ++#ifdef CONFIG_PM + .port_suspend = ahci_port_suspend, + .port_resume = ahci_port_resume, ++#endif + + .port_start = ahci_port_start, + .port_stop = ahci_port_stop, +@@ -441,8 +449,10 @@ static struct pci_driver ahci_pci_driver + .name = DRV_NAME, + .id_table = ahci_pci_tbl, + .probe = ahci_init_one, ++#ifdef CONFIG_PM + .suspend = ahci_pci_device_suspend, + .resume = ahci_pci_device_resume, ++#endif + .remove = ahci_remove_one, + }; + +@@ -587,6 +597,7 @@ static void ahci_power_up(void __iomem * + writel(cmd | PORT_CMD_ICC_ACTIVE, port_mmio + PORT_CMD); + } + ++#ifdef CONFIG_PM + static void ahci_power_down(void __iomem *port_mmio, u32 cap) + { + u32 cmd, scontrol; +@@ -604,6 +615,7 @@ static void ahci_power_down(void __iomem + cmd &= ~PORT_CMD_SPIN_UP; + writel(cmd, port_mmio + PORT_CMD); + } ++#endif + + static void ahci_init_port(void __iomem *port_mmio, u32 cap, + dma_addr_t cmd_slot_dma, dma_addr_t rx_fis_dma) +@@ -1336,6 +1348,7 @@ static void ahci_post_internal_cmd(struc + } + } + ++#ifdef CONFIG_PM + static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg) + { + struct ahci_host_priv *hpriv = ap->host->private_data; +@@ -1412,6 +1425,7 @@ static int ahci_pci_device_resume(struct + + return 0; + } ++#endif + + static int ahci_port_start(struct ata_port *ap) + { +--- linux-2.6.20.1.orig/drivers/ata/ata_generic.c ++++ linux-2.6.20.1/drivers/ata/ata_generic.c +@@ -119,8 +119,10 @@ static struct scsi_host_template generic + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations generic_port_ops = { +@@ -230,8 +232,10 @@ static struct pci_driver ata_generic_pci + .id_table = ata_generic, + .probe = ata_generic_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = ata_pci_device_resume, ++#endif + }; + + static int __init ata_generic_init(void) +--- linux-2.6.20.1.orig/drivers/ata/ata_piix.c ++++ linux-2.6.20.1/drivers/ata/ata_piix.c +@@ -255,8 +255,10 @@ static struct pci_driver piix_pci_driver + .id_table = piix_pci_tbl, + .probe = piix_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = ata_pci_device_resume, ++#endif + }; + + static struct scsi_host_template piix_sht = { +@@ -275,8 +277,10 @@ static struct scsi_host_template piix_sh + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static const struct ata_port_operations piix_pata_ops = { +--- linux-2.6.20.1.orig/drivers/ata/pata_ali.c ++++ linux-2.6.20.1/drivers/ata/pata_ali.c +@@ -345,8 +345,10 @@ static struct scsi_host_template ali_sht + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + /* +@@ -667,11 +669,13 @@ static int ali_init_one(struct pci_dev * + return ata_pci_init_one(pdev, port_info, 2); + } + ++#ifdef CONFIG_PM + static int ali_reinit_one(struct pci_dev *pdev) + { + ali_init_chipset(pdev); + return ata_pci_device_resume(pdev); + } ++#endif + + static const struct pci_device_id ali[] = { + { PCI_VDEVICE(AL, PCI_DEVICE_ID_AL_M5228), }, +@@ -685,8 +689,10 @@ static struct pci_driver ali_pci_driver + .id_table = ali, + .probe = ali_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = ali_reinit_one, ++#endif + }; + + static int __init ali_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_amd.c ++++ linux-2.6.20.1/drivers/ata/pata_amd.c +@@ -334,8 +334,10 @@ static struct scsi_host_template amd_sht + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations amd33_port_ops = { +@@ -663,6 +665,7 @@ static int amd_init_one(struct pci_dev * + return ata_pci_init_one(pdev, port_info, 2); + } + ++#ifdef CONFIG_PM + static int amd_reinit_one(struct pci_dev *pdev) + { + if (pdev->vendor == PCI_VENDOR_ID_AMD) { +@@ -679,6 +682,7 @@ static int amd_reinit_one(struct pci_dev + } + return ata_pci_device_resume(pdev); + } ++#endif + + static const struct pci_device_id amd[] = { + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_COBRA_7401), 0 }, +@@ -708,8 +712,10 @@ static struct pci_driver amd_pci_driver + .id_table = amd, + .probe = amd_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = amd_reinit_one, ++#endif + }; + + static int __init amd_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_atiixp.c ++++ linux-2.6.20.1/drivers/ata/pata_atiixp.c +@@ -224,8 +224,10 @@ static struct scsi_host_template atiixp_ + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations atiixp_port_ops = { +@@ -290,8 +292,10 @@ static struct pci_driver atiixp_pci_driv + .id_table = atiixp, + .probe = atiixp_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .resume = ata_pci_device_resume, + .suspend = ata_pci_device_suspend, ++#endif + }; + + static int __init atiixp_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_cmd64x.c ++++ linux-2.6.20.1/drivers/ata/pata_cmd64x.c +@@ -285,8 +285,10 @@ static struct scsi_host_template cmd64x_ + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations cmd64x_port_ops = { +@@ -479,6 +481,7 @@ static int cmd64x_init_one(struct pci_de + return ata_pci_init_one(pdev, port_info, 2); + } + ++#ifdef CONFIG_PM + static int cmd64x_reinit_one(struct pci_dev *pdev) + { + u8 mrdmode; +@@ -492,6 +495,7 @@ static int cmd64x_reinit_one(struct pci_ + #endif + return ata_pci_device_resume(pdev); + } ++#endif + + static const struct pci_device_id cmd64x[] = { + { PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_643), 0 }, +@@ -507,8 +511,10 @@ static struct pci_driver cmd64x_pci_driv + .id_table = cmd64x, + .probe = cmd64x_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = cmd64x_reinit_one, ++#endif + }; + + static int __init cmd64x_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_cs5520.c ++++ linux-2.6.20.1/drivers/ata/pata_cs5520.c +@@ -167,8 +167,10 @@ static struct scsi_host_template cs5520_ + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations cs5520_port_ops = { +@@ -298,6 +300,7 @@ static void __devexit cs5520_remove_one( + dev_set_drvdata(dev, NULL); + } + ++#ifdef CONFIG_PM + /** + * cs5520_reinit_one - device resume + * @pdev: PCI device +@@ -314,6 +317,8 @@ static int cs5520_reinit_one(struct pci_ + pci_write_config_byte(pdev, 0x60, pcicfg | 0x40); + return ata_pci_device_resume(pdev); + } ++#endif ++ + /* For now keep DMA off. We can set it for all but A rev CS5510 once the + core ATA code can handle it */ + +@@ -329,8 +334,10 @@ static struct pci_driver cs5520_pci_driv + .id_table = pata_cs5520, + .probe = cs5520_init_one, + .remove = cs5520_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = cs5520_reinit_one, ++#endif + }; + + static int __init cs5520_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_cs5530.c ++++ linux-2.6.20.1/drivers/ata/pata_cs5530.c +@@ -181,8 +181,10 @@ static struct scsi_host_template cs5530_ + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations cs5530_port_ops = { +@@ -369,6 +371,7 @@ static int cs5530_init_one(struct pci_de + return ata_pci_init_one(pdev, port_info, 2); + } + ++#ifdef CONFIG_PM + static int cs5530_reinit_one(struct pci_dev *pdev) + { + /* If we fail on resume we are doomed */ +@@ -376,6 +379,7 @@ static int cs5530_reinit_one(struct pci_ + BUG(); + return ata_pci_device_resume(pdev); + } ++#endif + + static const struct pci_device_id cs5530[] = { + { PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5530_IDE), }, +@@ -388,8 +392,10 @@ static struct pci_driver cs5530_pci_driv + .id_table = cs5530, + .probe = cs5530_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = cs5530_reinit_one, ++#endif + }; + + static int __init cs5530_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_cs5535.c ++++ linux-2.6.20.1/drivers/ata/pata_cs5535.c +@@ -185,8 +185,10 @@ static struct scsi_host_template cs5535_ + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations cs5535_port_ops = { +@@ -270,8 +272,10 @@ static struct pci_driver cs5535_pci_driv + .id_table = cs5535, + .probe = cs5535_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = ata_pci_device_resume, ++#endif + }; + + static int __init cs5535_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_cypress.c ++++ linux-2.6.20.1/drivers/ata/pata_cypress.c +@@ -136,8 +136,10 @@ static struct scsi_host_template cy82c69 + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations cy82c693_port_ops = { +@@ -206,8 +208,10 @@ static struct pci_driver cy82c693_pci_dr + .id_table = cy82c693, + .probe = cy82c693_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = ata_pci_device_resume, ++#endif + }; + + static int __init cy82c693_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_efar.c ++++ linux-2.6.20.1/drivers/ata/pata_efar.c +@@ -234,8 +234,10 @@ static struct scsi_host_template efar_sh + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static const struct ata_port_operations efar_ops = { +@@ -317,8 +319,10 @@ static struct pci_driver efar_pci_driver + .id_table = efar_pci_tbl, + .probe = efar_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = ata_pci_device_resume, ++#endif + }; + + static int __init efar_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_hpt366.c ++++ linux-2.6.20.1/drivers/ata/pata_hpt366.c +@@ -338,8 +338,10 @@ static struct scsi_host_template hpt36x_ + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + /* +@@ -467,12 +469,13 @@ static int hpt36x_init_one(struct pci_de + return ata_pci_init_one(dev, port_info, 2); + } + ++#ifdef CONFIG_PM + static int hpt36x_reinit_one(struct pci_dev *dev) + { + hpt36x_init_chipset(dev); + return ata_pci_device_resume(dev); + } +- ++#endif + + static const struct pci_device_id hpt36x[] = { + { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT366), }, +@@ -484,8 +487,10 @@ static struct pci_driver hpt36x_pci_driv + .id_table = hpt36x, + .probe = hpt36x_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = hpt36x_reinit_one, ++#endif + }; + + static int __init hpt36x_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_hpt3x3.c ++++ linux-2.6.20.1/drivers/ata/pata_hpt3x3.c +@@ -119,8 +119,10 @@ static struct scsi_host_template hpt3x3_ + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations hpt3x3_port_ops = { +@@ -206,11 +208,13 @@ static int hpt3x3_init_one(struct pci_de + return ata_pci_init_one(dev, port_info, 2); + } + ++#ifdef CONFIG_PM + static int hpt3x3_reinit_one(struct pci_dev *dev) + { + hpt3x3_init_chipset(dev); + return ata_pci_device_resume(dev); + } ++#endif + + static const struct pci_device_id hpt3x3[] = { + { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT343), }, +@@ -223,8 +227,10 @@ static struct pci_driver hpt3x3_pci_driv + .id_table = hpt3x3, + .probe = hpt3x3_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = hpt3x3_reinit_one, ++#endif + }; + + static int __init hpt3x3_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_it821x.c ++++ linux-2.6.20.1/drivers/ata/pata_it821x.c +@@ -676,8 +676,10 @@ static struct scsi_host_template it821x_ + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations it821x_smart_port_ops = { +@@ -810,6 +812,7 @@ static int it821x_init_one(struct pci_de + return ata_pci_init_one(pdev, port_info, 2); + } + ++#ifdef CONFIG_PM + static int it821x_reinit_one(struct pci_dev *pdev) + { + /* Resume - turn raid back off if need be */ +@@ -817,6 +820,7 @@ static int it821x_reinit_one(struct pci_ + it821x_disable_raid(pdev); + return ata_pci_device_resume(pdev); + } ++#endif + + static const struct pci_device_id it821x[] = { + { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), }, +@@ -830,8 +834,10 @@ static struct pci_driver it821x_pci_driv + .id_table = it821x, + .probe = it821x_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = it821x_reinit_one, ++#endif + }; + + static int __init it821x_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_jmicron.c ++++ linux-2.6.20.1/drivers/ata/pata_jmicron.c +@@ -222,6 +222,7 @@ static int jmicron_init_one (struct pci_ + return ata_pci_init_one(pdev, port_info, 2); + } + ++#ifdef CONFIG_PM + static int jmicron_reinit_one(struct pci_dev *pdev) + { + u32 reg; +@@ -242,6 +243,7 @@ static int jmicron_reinit_one(struct pci + } + return ata_pci_device_resume(pdev); + } ++#endif + + static const struct pci_device_id jmicron_pci_tbl[] = { + { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB361), 361}, +@@ -258,8 +260,10 @@ static struct pci_driver jmicron_pci_dri + .id_table = jmicron_pci_tbl, + .probe = jmicron_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = jmicron_reinit_one, ++#endif + }; + + static int __init jmicron_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_marvell.c ++++ linux-2.6.20.1/drivers/ata/pata_marvell.c +@@ -103,8 +103,10 @@ static struct scsi_host_template marvell + .slave_destroy = ata_scsi_slave_destroy, + /* Use standard CHS mapping rules */ + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static const struct ata_port_operations marvell_ops = { +@@ -199,8 +201,10 @@ static struct pci_driver marvell_pci_dri + .id_table = marvell_pci_tbl, + .probe = marvell_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = ata_pci_device_resume, ++#endif + }; + + static int __init marvell_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_mpiix.c ++++ linux-2.6.20.1/drivers/ata/pata_mpiix.c +@@ -167,8 +167,10 @@ static struct scsi_host_template mpiix_s + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations mpiix_port_ops = { +@@ -287,8 +289,10 @@ static struct pci_driver mpiix_pci_drive + .id_table = mpiix, + .probe = mpiix_init_one, + .remove = mpiix_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = ata_pci_device_resume, ++#endif + }; + + static int __init mpiix_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_netcell.c ++++ linux-2.6.20.1/drivers/ata/pata_netcell.c +@@ -63,8 +63,10 @@ static struct scsi_host_template netcell + .slave_destroy = ata_scsi_slave_destroy, + /* Use standard CHS mapping rules */ + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static const struct ata_port_operations netcell_ops = { +@@ -153,8 +155,10 @@ static struct pci_driver netcell_pci_dri + .id_table = netcell_pci_tbl, + .probe = netcell_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = ata_pci_device_resume, ++#endif + }; + + static int __init netcell_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_ns87410.c ++++ linux-2.6.20.1/drivers/ata/pata_ns87410.c +@@ -157,8 +157,10 @@ static struct scsi_host_template ns87410 + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations ns87410_port_ops = { +@@ -212,8 +214,10 @@ static struct pci_driver ns87410_pci_dri + .id_table = ns87410, + .probe = ns87410_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = ata_pci_device_resume, ++#endif + }; + + static int __init ns87410_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_oldpiix.c ++++ linux-2.6.20.1/drivers/ata/pata_oldpiix.c +@@ -232,8 +232,10 @@ static struct scsi_host_template oldpiix + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static const struct ata_port_operations oldpiix_pata_ops = { +@@ -315,8 +317,10 @@ static struct pci_driver oldpiix_pci_dri + .id_table = oldpiix_pci_tbl, + .probe = oldpiix_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = ata_pci_device_resume, ++#endif + }; + + static int __init oldpiix_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_opti.c ++++ linux-2.6.20.1/drivers/ata/pata_opti.c +@@ -179,8 +179,10 @@ static struct scsi_host_template opti_sh + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations opti_port_ops = { +@@ -244,8 +246,10 @@ static struct pci_driver opti_pci_driver + .id_table = opti, + .probe = opti_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = ata_pci_device_resume, ++#endif + }; + + static int __init opti_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_optidma.c ++++ linux-2.6.20.1/drivers/ata/pata_optidma.c +@@ -360,8 +360,10 @@ static struct scsi_host_template optidma + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations optidma_port_ops = { +@@ -524,8 +526,10 @@ static struct pci_driver optidma_pci_dri + .id_table = optidma, + .probe = optidma_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = ata_pci_device_resume, ++#endif + }; + + static int __init optidma_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_pdc202xx_old.c ++++ linux-2.6.20.1/drivers/ata/pata_pdc202xx_old.c +@@ -270,8 +270,10 @@ static struct scsi_host_template pdc202x + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations pdc2024x_port_ops = { +@@ -402,8 +404,10 @@ static struct pci_driver pdc202xx_pci_dr + .id_table = pdc202xx, + .probe = pdc202xx_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = ata_pci_device_resume, ++#endif + }; + + static int __init pdc202xx_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_radisys.c ++++ linux-2.6.20.1/drivers/ata/pata_radisys.c +@@ -228,8 +228,10 @@ static struct scsi_host_template radisys + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static const struct ata_port_operations radisys_pata_ops = { +@@ -312,8 +314,10 @@ static struct pci_driver radisys_pci_dri + .id_table = radisys_pci_tbl, + .probe = radisys_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = ata_pci_device_resume, ++#endif + }; + + static int __init radisys_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_rz1000.c ++++ linux-2.6.20.1/drivers/ata/pata_rz1000.c +@@ -93,8 +93,10 @@ static struct scsi_host_template rz1000_ + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations rz1000_port_ops = { +@@ -177,6 +179,7 @@ static int rz1000_init_one (struct pci_d + return -ENODEV; + } + ++#ifdef CONFIG_PM + static int rz1000_reinit_one(struct pci_dev *pdev) + { + /* If this fails on resume (which is a "cant happen" case), we +@@ -185,6 +188,7 @@ static int rz1000_reinit_one(struct pci_ + panic("rz1000 fifo"); + return ata_pci_device_resume(pdev); + } ++#endif + + static const struct pci_device_id pata_rz1000[] = { + { PCI_VDEVICE(PCTECH, PCI_DEVICE_ID_PCTECH_RZ1000), }, +@@ -198,8 +202,10 @@ static struct pci_driver rz1000_pci_driv + .id_table = pata_rz1000, + .probe = rz1000_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = rz1000_reinit_one, ++#endif + }; + + static int __init rz1000_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_sc1200.c ++++ linux-2.6.20.1/drivers/ata/pata_sc1200.c +@@ -194,8 +194,10 @@ static struct scsi_host_template sc1200_ + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations sc1200_port_ops = { +@@ -266,8 +268,10 @@ static struct pci_driver sc1200_pci_driv + .id_table = sc1200, + .probe = sc1200_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = ata_pci_device_resume, ++#endif + }; + + static int __init sc1200_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_serverworks.c ++++ linux-2.6.20.1/drivers/ata/pata_serverworks.c +@@ -326,8 +326,10 @@ static struct scsi_host_template serverw + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations serverworks_osb4_port_ops = { +@@ -555,6 +557,7 @@ static int serverworks_init_one(struct p + return ata_pci_init_one(pdev, port_info, ports); + } + ++#ifdef CONFIG_PM + static int serverworks_reinit_one(struct pci_dev *pdev) + { + /* Force master latency timer to 64 PCI clocks */ +@@ -578,6 +581,7 @@ static int serverworks_reinit_one(struct + } + return ata_pci_device_resume(pdev); + } ++#endif + + static const struct pci_device_id serverworks[] = { + { PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE), 0}, +@@ -594,8 +598,10 @@ static struct pci_driver serverworks_pci + .id_table = serverworks, + .probe = serverworks_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = serverworks_reinit_one, ++#endif + }; + + static int __init serverworks_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_sil680.c ++++ linux-2.6.20.1/drivers/ata/pata_sil680.c +@@ -371,11 +371,13 @@ static int sil680_init_one(struct pci_de + return ata_pci_init_one(pdev, port_info, 2); + } + ++#ifdef CONFIG_PM + static int sil680_reinit_one(struct pci_dev *pdev) + { + sil680_init_chip(pdev); + return ata_pci_device_resume(pdev); + } ++#endif + + static const struct pci_device_id sil680[] = { + { PCI_VDEVICE(CMD, PCI_DEVICE_ID_SII_680), }, +@@ -388,8 +390,10 @@ static struct pci_driver sil680_pci_driv + .id_table = sil680, + .probe = sil680_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = sil680_reinit_one, ++#endif + }; + + static int __init sil680_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_sis.c ++++ linux-2.6.20.1/drivers/ata/pata_sis.c +@@ -546,8 +546,10 @@ static struct scsi_host_template sis_sht + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static const struct ata_port_operations sis_133_ops = { +@@ -1001,8 +1003,10 @@ static struct pci_driver sis_pci_driver + .id_table = sis_pci_tbl, + .probe = sis_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = ata_pci_device_resume, ++#endif + }; + + static int __init sis_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_triflex.c ++++ linux-2.6.20.1/drivers/ata/pata_triflex.c +@@ -193,8 +193,10 @@ static struct scsi_host_template triflex + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations triflex_port_ops = { +@@ -260,8 +262,10 @@ static struct pci_driver triflex_pci_dri + .id_table = triflex, + .probe = triflex_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = ata_pci_device_resume, ++#endif + }; + + static int __init triflex_init(void) +--- linux-2.6.20.1.orig/drivers/ata/pata_via.c ++++ linux-2.6.20.1/drivers/ata/pata_via.c +@@ -305,8 +305,10 @@ static struct scsi_host_template via_sht + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .resume = ata_scsi_device_resume, + .suspend = ata_scsi_device_suspend, ++#endif + }; + + static struct ata_port_operations via_port_ops = { +@@ -560,6 +562,7 @@ static int via_init_one(struct pci_dev * + return ata_pci_init_one(pdev, port_info, 2); + } + ++#ifdef CONFIG_PM + /** + * via_reinit_one - reinit after resume + * @pdev; PCI device +@@ -592,6 +595,7 @@ static int via_reinit_one(struct pci_dev + } + return ata_pci_device_resume(pdev); + } ++#endif + + static const struct pci_device_id via[] = { + { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C576_1), }, +@@ -607,8 +611,10 @@ static struct pci_driver via_pci_driver + .id_table = via, + .probe = via_init_one, + .remove = ata_pci_remove_one, ++#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = via_reinit_one, ++#endif + }; + + static int __init via_init(void) +--- linux-2.6.20.1.orig/drivers/ata/sata_sil.c ++++ linux-2.6.20.1/drivers/ata/sata_sil.c +@@ -181,8 +181,10 @@ static struct scsi_host_template sil_sht + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .suspend = ata_scsi_device_suspend, + .resume = ata_scsi_device_resume, ++#endif + }; + + static const struct ata_port_operations sil_ops = { +--- linux-2.6.20.1.orig/drivers/ata/sata_sil24.c ++++ linux-2.6.20.1/drivers/ata/sata_sil24.c +@@ -386,8 +386,10 @@ static struct scsi_host_template sil24_s + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM + .suspend = ata_scsi_device_suspend, + .resume = ata_scsi_device_resume, ++#endif + }; + + static const struct ata_port_operations sil24_ops = { diff --git a/queue-2.6.20/libata-add-missing-pm-callbacks.patch b/queue-2.6.20/libata-add-missing-pm-callbacks.patch new file mode 100644 index 00000000000..2451139726e --- /dev/null +++ b/queue-2.6.20/libata-add-missing-pm-callbacks.patch @@ -0,0 +1,48 @@ +From stable-bounces@linux.kernel.org Fri Mar 2 00:46:56 2007 +From: Tejun Heo +Date: Fri, 2 Mar 2007 17:45:30 +0900 +Subject: libata: add missing PM callbacks +To: Guennadi Liakhovetski +Cc: , stable@kernel.org, Alan +Message-ID: <20070302084530.GN20322@htj.dyndns.org> +Content-Disposition: inline + +From: Tejun Heo + +Some LLDs were missing scsi device PM callbacks while having host/port +suspend support. Add missing ones. + +Signed-off-by: Tejun Heo +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ata/pata_jmicron.c | 4 ++++ + drivers/ata/pata_sil680.c | 4 ++++ + 2 files changed, 8 insertions(+) + +--- linux-2.6.20.1.orig/drivers/ata/pata_jmicron.c ++++ linux-2.6.20.1/drivers/ata/pata_jmicron.c +@@ -137,6 +137,10 @@ static struct scsi_host_template jmicron + .slave_destroy = ata_scsi_slave_destroy, + /* Use standard CHS mapping rules */ + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM ++ .suspend = ata_scsi_device_suspend, ++ .resume = ata_scsi_device_resume, ++#endif + }; + + static const struct ata_port_operations jmicron_ops = { +--- linux-2.6.20.1.orig/drivers/ata/pata_sil680.c ++++ linux-2.6.20.1/drivers/ata/pata_sil680.c +@@ -226,6 +226,10 @@ static struct scsi_host_template sil680_ + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM ++ .suspend = ata_scsi_device_suspend, ++ .resume = ata_scsi_device_resume, ++#endif + }; + + static struct ata_port_operations sil680_port_ops = { diff --git a/queue-2.6.20/mmc-power-quirk-for-ene-controllers.patch b/queue-2.6.20/mmc-power-quirk-for-ene-controllers.patch new file mode 100644 index 00000000000..6bcec05b56f --- /dev/null +++ b/queue-2.6.20/mmc-power-quirk-for-ene-controllers.patch @@ -0,0 +1,88 @@ +From stable-bounces@linux.kernel.org Mon Feb 26 19:33:30 2007 +From: Darren Salt +Date: Tue, 27 Feb 2007 02:47:18 +0000 +Subject: mmc: Power quirk for ENE controllers +To: linux-kernel@vger.kernel.org, stable@kernel.org +Message-ID: <4EBB823D2F%linux@youmustbejoking.demon.co.uk> + +From: Darren Salt + +mmc: Power quirk for ENE controllers + +Support for these devices was broken for 2.6.18-rc1 and later by commit +146ad66eac836c0b976c98f428d73e1f6a75270d, which added voltage level support. + +This restores the previous behaviour for these devices by ensuring that when +the voltage is changed, only one write to set the voltage is performed. + +It may be that both writes are needed if the voltage is being changed between +two non-zero values or that it's safe to ensure that only one write is done +if the hardware only supports one voltage; I don't know whether either is the +case nor can I test since I have only the one SD reader (1524:0550), and it +supports just the one voltage. + +Signed-off-by: Darren Salt +Signed-off-by: Pierre Ossman +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mmc/sdhci.c | 22 +++++++++++++++++++--- + include/linux/pci_ids.h | 1 + + 2 files changed, 20 insertions(+), 3 deletions(-) + +--- linux-2.6.20.1.orig/drivers/mmc/sdhci.c ++++ linux-2.6.20.1/drivers/mmc/sdhci.c +@@ -37,6 +37,7 @@ static unsigned int debug_quirks = 0; + #define SDHCI_QUIRK_FORCE_DMA (1<<1) + /* Controller doesn't like some resets when there is no card inserted. */ + #define SDHCI_QUIRK_NO_CARD_NO_RESET (1<<2) ++#define SDHCI_QUIRK_SINGLE_POWER_WRITE (1<<3) + + static const struct pci_device_id pci_ids[] __devinitdata = { + { +@@ -65,6 +66,14 @@ static const struct pci_device_id pci_id + .driver_data = SDHCI_QUIRK_FORCE_DMA, + }, + ++ { ++ .vendor = PCI_VENDOR_ID_ENE, ++ .device = PCI_DEVICE_ID_ENE_CB712_SD, ++ .subvendor = PCI_ANY_ID, ++ .subdevice = PCI_ANY_ID, ++ .driver_data = SDHCI_QUIRK_SINGLE_POWER_WRITE, ++ }, ++ + { /* Generic SD host controller */ + PCI_DEVICE_CLASS((PCI_CLASS_SYSTEM_SDHCI << 8), 0xFFFF00) + }, +@@ -674,10 +683,17 @@ static void sdhci_set_power(struct sdhci + if (host->power == power) + return; + +- writeb(0, host->ioaddr + SDHCI_POWER_CONTROL); +- +- if (power == (unsigned short)-1) ++ if (power == (unsigned short)-1) { ++ writeb(0, host->ioaddr + SDHCI_POWER_CONTROL); + goto out; ++ } ++ ++ /* ++ * Spec says that we should clear the power reg before setting ++ * a new value. Some controllers don't seem to like this though. ++ */ ++ if (!(host->chip->quirks & SDHCI_QUIRK_SINGLE_POWER_WRITE)) ++ writeb(0, host->ioaddr + SDHCI_POWER_CONTROL); + + pwr = SDHCI_POWER_ON; + +--- linux-2.6.20.1.orig/include/linux/pci_ids.h ++++ linux-2.6.20.1/include/linux/pci_ids.h +@@ -1971,6 +1971,7 @@ + #define PCI_DEVICE_ID_TOPIC_TP560 0x0000 + + #define PCI_VENDOR_ID_ENE 0x1524 ++#define PCI_DEVICE_ID_ENE_CB712_SD 0x0550 + #define PCI_DEVICE_ID_ENE_1211 0x1211 + #define PCI_DEVICE_ID_ENE_1225 0x1225 + #define PCI_DEVICE_ID_ENE_1410 0x1410 diff --git a/queue-2.6.20/powerpc-fix-performance-monitor-exception.patch b/queue-2.6.20/powerpc-fix-performance-monitor-exception.patch new file mode 100644 index 00000000000..ba4fa6cbd02 --- /dev/null +++ b/queue-2.6.20/powerpc-fix-performance-monitor-exception.patch @@ -0,0 +1,61 @@ +From stable-bounces@linux.kernel.org Wed Feb 21 21:14:47 2007 +From: Livio Soares +Date: Thu, 22 Feb 2007 16:13:17 +1100 +Subject: POWERPC: Fix performance monitor exception +To: stable@kernel.org +Message-ID: <17885.9837.44671.2038@cargo.ozlabs.ibm.com> + + +From: Livio Soares + +To the issue: some point during 2.6.20 development, Paul Mackerras +introduced the "lazy IRQ disabling" patch (very cool work, BTW). +In that patch, the performance monitor unit exception was marked as +"maskable", in the sense that if interrupts were soft-disabled, that +exception could be ignored. This broke my PowerPC profiling code. +The symptom that I see is that a varying number of interrupts +(from 0 to $n$, typically closer to 0) get delivered, when, in +reality, it should always be very close to $n$. + +The issue stems from the way masking is being done. Masking in +this fashion seems to work well with the decrementer and external +interrupts, because they are raised again until "really" handled. +For the PMU, however, this does not apply (at least on my Xserver +machine with a 970FX processor). If the PMU exception is not handled, +it will _not_ be re-raised (at least on my machine). The documentation +states that the PMXE bit in MMCR0 is set to 0 when the PMU exception +is raised. However, software must re-set the bit to re-enable PMU +exceptions. If the exception is ignored (as currently) not only is +that interrupt lost, but because software does not re-set PMXE, the +PMU registers are "frozen" forever. + +[This patch means that performance monitor exceptions are taken and +handled even if irqs are off, as long as some other interrupt hasn't +come along and caused interrupts to be hard-disabled. In this sense +the PMU exception becomes like an NMI. The oprofile code for most +powerpc processors does nothing that is unsafe in an NMI context, but +the Cell oprofile code does a spin_lock_irqsave. However, that turns +out to be OK because Cell doesn't actually use the performance +monitor exception; performance monitor interrupts come in as a +regular interrupt on Cell, so will be disabled when irqs are off. + -- paulus.] + +From: Livio Soares +Signed-off-by: Paul Mackerras +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/kernel/head_64.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- linux-2.6.20.1.orig/arch/powerpc/kernel/head_64.S ++++ linux-2.6.20.1/arch/powerpc/kernel/head_64.S +@@ -613,7 +613,7 @@ system_call_pSeries: + /*** pSeries interrupt support ***/ + + /* moved from 0xf00 */ +- MASKABLE_EXCEPTION_PSERIES(., performance_monitor) ++ STD_EXCEPTION_PSERIES(., performance_monitor) + + /* + * An interrupt came in while soft-disabled; clear EE in SRR1, diff --git a/queue-2.6.20/series b/queue-2.6.20/series index 63e6629f6bd..cebd9bca094 100644 --- a/queue-2.6.20/series +++ b/queue-2.6.20/series @@ -56,3 +56,16 @@ swsusp-fix-possible-oops-in-userland-interface.patch sata_sil-ignore-and-clear-spurious-irqs-while-executing-commands-by-polling.patch fix-umask-when-noacl-kernel-meets-extn-tuned-for-acls.patch uml-fix-2.6.20-hang.patch +mmc-power-quirk-for-ene-controllers.patch +bcm43xx-fix-assertion-failures-in-interrupt-handler.patch +libata-add-missing-pm-callbacks.patch +libata-add-missing-config_pm-in-llds.patch +powerpc-fix-performance-monitor-exception.patch +hid-fix-possible-double-free-on-error-path-in-hid-parser.patch +fix-interrupt-probing-on-e450-sparc64-systems.patch +fix-xfrm_add_sa_expire-return-value.patch +fix-skb-data-reallocation-handling-in-ipsec.patch +fix-100-cpu-spinning-on-sparc64.patch +fix-tcp-md5-locking.patch +don-t-add-anycast-reference-to-device-multiple-times.patch +fix-anycast-procfs-device-leak.patch