]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
more 2.6.20 patches added
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 7 Mar 2007 15:03:20 +0000 (07:03 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 7 Mar 2007 15:03:20 +0000 (07:03 -0800)
queue-2.6.20/ata-convert-gsi-to-irq-on-ia64.patch [new file with mode: 0644]
queue-2.6.20/bug-in-gdth.c-crashing-machine.patch [new file with mode: 0644]
queue-2.6.20/fix-section-mismatch-warning-in-lockdep.patch [new file with mode: 0644]
queue-2.6.20/gfs2-fix-locking-mistake.patch [new file with mode: 0644]
queue-2.6.20/pktcdvd-correctly-set-cmd_len-field-in-pkt_generic_packet.patch [new file with mode: 0644]
queue-2.6.20/revert-drivers-net-tulip-dmfe-support-basic-carrier-detection.patch [new file with mode: 0644]
queue-2.6.20/series
queue-2.6.20/throttle_vm_writeout-don-t-loop-on-gfp_nofs-and-gfp_noio-allocations.patch [new file with mode: 0644]
queue-2.6.20/ueagle-atm.c-needs-sched.h.patch [new file with mode: 0644]
queue-2.6.20/video-aty-mach64_ct.c-fix-bogus-delay-loop.patch [new file with mode: 0644]

diff --git a/queue-2.6.20/ata-convert-gsi-to-irq-on-ia64.patch b/queue-2.6.20/ata-convert-gsi-to-irq-on-ia64.patch
new file mode 100644 (file)
index 0000000..6303c2d
--- /dev/null
@@ -0,0 +1,51 @@
+From stable-bounces@linux.kernel.org Wed Feb 14 23:38:36 2007
+From: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
+Date: Wed, 14 Feb 2007 23:37:03 -0800
+Subject: ATA: convert GSI to irq on ia64
+To: mm-commits@vger.kernel.org
+Cc: yanmin.zhang@intel.com, yanmin_zhang@linux.intel.com, tony.luck@intel.com, stable@kernel.org, jeff@garzik.org
+Message-ID: <200702150737.l1F7b3VJ023161@shell0.pdx.osdl.net>
+
+
+From: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
+
+If an ATA drive uses legacy mode, ata driver will choose 14 and 15 as the
+fixed irq number.  On ia64 platform, such numbers are GSI and should be
+converted to irq vector.
+
+Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
+Cc: Jeff Garzik <jeff@garzik.org>
+Cc: "Luck, Tony" <tony.luck@intel.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/ia64/Kconfig                 |    1 +
+ include/asm-ia64/libata-portmap.h |   12 ++++++++++++
+ 2 files changed, 13 insertions(+)
+
+--- linux-2.6.20.1.orig/arch/ia64/Kconfig
++++ linux-2.6.20.1/arch/ia64/Kconfig
+@@ -11,6 +11,7 @@ menu "Processor type and features"
+ config IA64
+       bool
++      select ATA_NONSTANDARD if ATA
+       default y
+       help
+         The Itanium Processor Family is Intel's 64-bit successor to
+--- /dev/null
++++ linux-2.6.20.1/include/asm-ia64/libata-portmap.h
+@@ -0,0 +1,12 @@
++#ifndef __ASM_IA64_LIBATA_PORTMAP_H
++#define __ASM_IA64_LIBATA_PORTMAP_H
++
++#define ATA_PRIMARY_CMD               0x1F0
++#define ATA_PRIMARY_CTL               0x3F6
++#define ATA_PRIMARY_IRQ(dev)  isa_irq_to_vector(14)
++
++#define ATA_SECONDARY_CMD     0x170
++#define ATA_SECONDARY_CTL     0x376
++#define ATA_SECONDARY_IRQ(dev)        isa_irq_to_vector(15)
++
++#endif
diff --git a/queue-2.6.20/bug-in-gdth.c-crashing-machine.patch b/queue-2.6.20/bug-in-gdth.c-crashing-machine.patch
new file mode 100644 (file)
index 0000000..534ce82
--- /dev/null
@@ -0,0 +1,41 @@
+From stable-bounces@linux.kernel.org Tue Mar  6 02:48:36 2007
+From: Joerg Dorchain <joerg@dorchain.net>
+Date: Tue, 06 Mar 2007 02:46:54 -0800
+Subject: bug in gdth.c crashing machine
+To: James.Bottomley@steeleye.com
+Cc: Achim_Leubner@adaptec.com, akpm@linux-foundation.org, joerg@dorchain.net, linux-scsi@vger.kernel.org, stable@kernel.org
+Message-ID: <200703061046.l26AksTi020093@shell0.pdx.osdl.net>
+
+
+From: Joerg Dorchain <joerg@dorchain.net>
+
+Undocumented...
+
+Signed-off-by: Joerg Dorchain <joerg@dorchain.net>
+Acked-by: "Leubner, Achim" <Achim_Leubner@adaptec.com>
+Cc: James Bottomley <James.Bottomley@steeleye.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/scsi/gdth.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- linux-2.6.20.1.orig/drivers/scsi/gdth.c
++++ linux-2.6.20.1/drivers/scsi/gdth.c
+@@ -3092,6 +3092,7 @@ static int gdth_fill_raw_cmd(int hanum,S
+             cmdp->u.raw64.direction  = 
+                 gdth_direction_tab[scp->cmnd[0]]==DOU ? GDTH_DATA_OUT:GDTH_DATA_IN;
+             memcpy(cmdp->u.raw64.cmd,scp->cmnd,16);
++            cmdp->u.raw64.sg_ranz    = 0;
+         } else {
+             cmdp->u.raw.reserved   = 0;
+             cmdp->u.raw.mdisc_time = 0;
+@@ -3108,6 +3109,7 @@ static int gdth_fill_raw_cmd(int hanum,S
+             cmdp->u.raw.direction  = 
+                 gdth_direction_tab[scp->cmnd[0]]==DOU ? GDTH_DATA_OUT:GDTH_DATA_IN;
+             memcpy(cmdp->u.raw.cmd,scp->cmnd,12);
++            cmdp->u.raw.sg_ranz    = 0;
+         }
+         if (scp->use_sg) {
diff --git a/queue-2.6.20/fix-section-mismatch-warning-in-lockdep.patch b/queue-2.6.20/fix-section-mismatch-warning-in-lockdep.patch
new file mode 100644 (file)
index 0000000..0d7444a
--- /dev/null
@@ -0,0 +1,44 @@
+From stable-bounces@linux.kernel.org Wed Feb 28 20:14:03 2007
+From: Sam Ravnborg <sam@ravnborg.org>
+Date: Wed, 28 Feb 2007 20:12:31 -0800
+Subject: fix section mismatch warning in lockdep
+To: torvalds@linux-foundation.org
+Cc: akpm@linux-foundation.org, sam@ravnborg.org, mingo@elte.hu, stable@kernel.org
+Message-ID: <200703010412.l214CVNl004099@shell0.pdx.osdl.net>
+
+
+From: Sam Ravnborg <sam@ravnborg.org>
+
+lockdep_init() is marked __init but used in several places
+outside __init code. This causes following warnings:
+$ scripts/mod/modpost kernel/lockdep.o
+WARNING: kernel/built-in.o - Section mismatch: reference to .init.text:lockdep_init from .text.lockdep_init_map after 'lockdep_init_map' (at offset 0x105)
+WARNING: kernel/built-in.o - Section mismatch: reference to .init.text:lockdep_init from .text.lockdep_reset_lock after 'lockdep_reset_lock' (at offset 0x35)
+WARNING: kernel/built-in.o - Section mismatch: reference to .init.text:lockdep_init from .text.__lock_acquire after '__lock_acquire' (at offset 0xb2)
+
+The warnings are less obviously due to heavy inlining by gcc - this is not
+altered.
+
+Fix the section mismatch warnings by removing the __init marking, which
+seems obviously wrong.
+
+Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
+Acked-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/lockdep.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/kernel/lockdep.c
++++ linux-2.6.20.1/kernel/lockdep.c
+@@ -2577,7 +2577,7 @@ out_restore:
+       raw_local_irq_restore(flags);
+ }
+-void __init lockdep_init(void)
++void lockdep_init(void)
+ {
+       int i;
diff --git a/queue-2.6.20/gfs2-fix-locking-mistake.patch b/queue-2.6.20/gfs2-fix-locking-mistake.patch
new file mode 100644 (file)
index 0000000..00cf0c8
--- /dev/null
@@ -0,0 +1,33 @@
+From stable-bounces@linux.kernel.org Wed Feb 21 14:39:16 2007
+From: Josef Whiter <jwhiter@redhat.com>
+Date: Wed, 21 Feb 2007 14:37:59 -0800
+Subject: gfs2: fix locking mistake
+To: mm-commits@vger.kernel.org
+Cc: jwhiter@redhat.com, stable@kernel.org, swhiteho@redhat.com
+Message-ID: <200702212237.l1LMbxF0028615@shell0.pdx.osdl.net>
+
+From: Josef Whiter <jwhiter@redhat.com>
+
+Fix a locking mistake in the quota code, we do a mutex_lock instead of a
+mutex_unlock.
+
+Signed-off-by: Josef Whiter <jwhiter@redhat.com>
+Cc: Steven Whitehouse <swhiteho@redhat.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/gfs2/quota.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/fs/gfs2/quota.c
++++ linux-2.6.20.1/fs/gfs2/quota.c
+@@ -279,7 +279,7 @@ static int bh_get(struct gfs2_quota_data
+               (bh->b_data + sizeof(struct gfs2_meta_header) +
+                offset * sizeof(struct gfs2_quota_change));
+-      mutex_lock(&sdp->sd_quota_mutex);
++      mutex_unlock(&sdp->sd_quota_mutex);
+       return 0;
diff --git a/queue-2.6.20/pktcdvd-correctly-set-cmd_len-field-in-pkt_generic_packet.patch b/queue-2.6.20/pktcdvd-correctly-set-cmd_len-field-in-pkt_generic_packet.patch
new file mode 100644 (file)
index 0000000..040f104
--- /dev/null
@@ -0,0 +1,34 @@
+From stable-bounces@linux.kernel.org Mon Feb 12 21:34:07 2007
+From: Gerhard Dirschl <gd@spherenet.de>
+Date: Mon, 12 Feb 2007 21:32:43 -0800
+Subject: pktcdvd: Correctly set cmd_len field in pkt_generic_packet
+To: mm-commits@vger.kernel.org
+Cc: petero2@telia.com, stable@kernel.org, gd@spherenet.de
+Message-ID: <200702130532.l1D5Wh5H022691@shell0.pdx.osdl.net>
+
+
+From: Gerhard Dirschl <gd@spherenet.de>
+
+Fixes http://bugzilla.kernel.org/show_bug.cgi?id=7810 - a silly
+copy-paste bug introduced by the latest change.
+
+Signed-off-by: Gerhard Dirschl <gd@spherenet.de>
+Cc: Peter Osterlund <petero2@telia.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/block/pktcdvd.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/drivers/block/pktcdvd.c
++++ linux-2.6.20.1/drivers/block/pktcdvd.c
+@@ -777,7 +777,7 @@ static int pkt_generic_packet(struct pkt
+                       goto out;
+       }
+-      rq->cmd_len = COMMAND_SIZE(rq->cmd[0]);
++      rq->cmd_len = COMMAND_SIZE(cgc->cmd[0]);
+       memcpy(rq->cmd, cgc->cmd, CDROM_PACKET_SIZE);
+       if (sizeof(rq->cmd) > CDROM_PACKET_SIZE)
+               memset(rq->cmd + CDROM_PACKET_SIZE, 0, sizeof(rq->cmd) - CDROM_PACKET_SIZE);
diff --git a/queue-2.6.20/revert-drivers-net-tulip-dmfe-support-basic-carrier-detection.patch b/queue-2.6.20/revert-drivers-net-tulip-dmfe-support-basic-carrier-detection.patch
new file mode 100644 (file)
index 0000000..ea41723
--- /dev/null
@@ -0,0 +1,84 @@
+From stable-bounces@linux.kernel.org Tue Mar  6 02:46:25 2007
+From: Andrew Morton <akpm@linux-foundation.org>
+Date: Tue, 06 Mar 2007 02:41:49 -0800
+Subject: revert "drivers/net/tulip/dmfe: support basic carrier detection"
+To: jeff@garzik.org
+Cc: netdev@vger.kernel.org, thomas@archlinux.org, val_henson@linux.intel.com, samuel.thibault@ens-lyon.org, akpm@linux-foundation.org, stable@kernel.org
+Message-ID: <200703061041.l26Afnqh019746@shell0.pdx.osdl.net>
+
+
+From: Andrew Morton <akpm@linux-foundation.org>
+
+Revert 7628b0a8c01a02966d2228bdf741ddedb128e8f8.  Thomas Bachler
+reports:
+
+  Commit 7628b0a8c01a02966d2228bdf741ddedb128e8f8 (drivers/net/tulip/dmfe:
+  support basic carrier detection) breaks networking on my Davicom DM9009. 
+  ethtool always reports there is no link.  tcpdump shows incoming packets,
+  but TX is disabled.  Reverting the above patch fixes the problem.
+
+
+Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Cc: Jeff Garzik <jeff@garzik.org>
+Cc: Valerie Henson <val_henson@linux.intel.com>
+Cc: Thomas Bachler <thomas@archlinux.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/tulip/dmfe.c |    9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/net/tulip/dmfe.c
++++ linux-2.6.20.1/drivers/net/tulip/dmfe.c
+@@ -187,7 +187,7 @@ struct rx_desc {
+ struct dmfe_board_info {
+       u32 chip_id;                    /* Chip vendor/Device ID */
+       u32 chip_revision;              /* Chip revision */
+-      struct DEVICE *dev;             /* net device */
++      struct DEVICE *next_dev;        /* next device */
+       struct pci_dev *pdev;           /* PCI device */
+       spinlock_t lock;
+@@ -399,8 +399,6 @@ static int __devinit dmfe_init_one (stru
+       /* Init system & device */
+       db = netdev_priv(dev);
+-      db->dev = dev;
+-
+       /* Allocate Tx/Rx descriptor memory */
+       db->desc_pool_ptr = pci_alloc_consistent(pdev, sizeof(struct tx_desc) * DESC_ALL_CNT + 0x20, &db->desc_pool_dma_ptr);
+       db->buf_pool_ptr = pci_alloc_consistent(pdev, TX_BUF_ALLOC * TX_DESC_CNT + 4, &db->buf_pool_dma_ptr);
+@@ -428,7 +426,6 @@ static int __devinit dmfe_init_one (stru
+       dev->poll_controller = &poll_dmfe;
+ #endif
+       dev->ethtool_ops = &netdev_ethtool_ops;
+-      netif_carrier_off(db->dev);
+       spin_lock_init(&db->lock);
+       pci_read_config_dword(pdev, 0x50, &pci_pmr);
+@@ -1053,7 +1050,6 @@ static void netdev_get_drvinfo(struct ne
+ static const struct ethtool_ops netdev_ethtool_ops = {
+       .get_drvinfo            = netdev_get_drvinfo,
+-      .get_link               = ethtool_op_get_link,
+ };
+ /*
+@@ -1148,7 +1144,6 @@ static void dmfe_timer(unsigned long dat
+               /* Link Failed */
+               DMFE_DBUG(0, "Link Failed", tmp_cr12);
+               db->link_failed = 1;
+-              netif_carrier_off(db->dev);
+               /* For Force 10/100M Half/Full mode: Enable Auto-Nego mode */
+               /* AUTO or force 1M Homerun/Longrun don't need */
+@@ -1171,8 +1166,6 @@ static void dmfe_timer(unsigned long dat
+                       if ( (db->media_mode & DMFE_AUTO) &&
+                               dmfe_sense_speed(db) )
+                               db->link_failed = 1;
+-                      else
+-                              netif_carrier_on(db->dev);
+                       dmfe_process_mode(db);
+                       /* SHOW_MEDIA_TYPE(db->op_mode); */
+               }
index c8efe521de5c87d44b40af723546f715c788c3f0..749ae88ac3ac8bd647e9940973700efa879a92c0 100644 (file)
@@ -90,3 +90,12 @@ buffer-memorder-fix.patch
 char-specialix-isr-have-2-params.patch
 lockdep-forward-declare-struct-task_struct.patch
 kvm-fix-asm-constraint-for-lldt-instruction.patch
+ueagle-atm.c-needs-sched.h.patch
+fix-section-mismatch-warning-in-lockdep.patch
+throttle_vm_writeout-don-t-loop-on-gfp_nofs-and-gfp_noio-allocations.patch
+bug-in-gdth.c-crashing-machine.patch
+revert-drivers-net-tulip-dmfe-support-basic-carrier-detection.patch
+video-aty-mach64_ct.c-fix-bogus-delay-loop.patch
+pktcdvd-correctly-set-cmd_len-field-in-pkt_generic_packet.patch
+ata-convert-gsi-to-irq-on-ia64.patch
+gfs2-fix-locking-mistake.patch
diff --git a/queue-2.6.20/throttle_vm_writeout-don-t-loop-on-gfp_nofs-and-gfp_noio-allocations.patch b/queue-2.6.20/throttle_vm_writeout-don-t-loop-on-gfp_nofs-and-gfp_noio-allocations.patch
new file mode 100644 (file)
index 0000000..8619f76
--- /dev/null
@@ -0,0 +1,85 @@
+From stable-bounces@linux.kernel.org Wed Feb 28 20:14:55 2007
+From: Andrew Morton <akpm@linux-foundation.org>
+Date: Wed, 28 Feb 2007 20:13:21 -0800
+Subject: throttle_vm_writeout(): don't loop on GFP_NOFS and GFP_NOIO allocations
+To: torvalds@linux-foundation.org
+Cc: nickpiggin@yahoo.com.au, galak@kernel.crashing.org, zaitcev@redhat.com, akpm@linux-foundation.org, stable@kernel.org, hirofumi@mail.parknet.co.jp
+Message-ID: <200703010413.l214DLO1004150@shell0.pdx.osdl.net>
+
+
+From: Andrew Morton <akpm@linux-foundation.org>
+
+throttle_vm_writeout() is designed to wait for the dirty levels to subside. 
+But if the caller holds IO or FS locks, we might be holding up that writeout.
+
+So change it to take a single nap to give other devices a chance to clean some
+memory, then return.
+
+Cc: Nick Piggin <nickpiggin@yahoo.com.au>
+Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
+Cc: Kumar Gala <galak@kernel.crashing.org>
+Cc: Pete Zaitcev <zaitcev@redhat.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/linux/writeback.h |    2 +-
+ mm/page-writeback.c       |   13 +++++++++++--
+ mm/vmscan.c               |    2 +-
+ 3 files changed, 13 insertions(+), 4 deletions(-)
+
+--- linux-2.6.20.1.orig/include/linux/writeback.h
++++ linux-2.6.20.1/include/linux/writeback.h
+@@ -84,7 +84,7 @@ static inline void wait_on_inode(struct 
+ int wakeup_pdflush(long nr_pages);
+ void laptop_io_completion(void);
+ void laptop_sync_completion(void);
+-void throttle_vm_writeout(void);
++void throttle_vm_writeout(gfp_t gfp_mask);
+ /* These are exported to sysctl. */
+ extern int dirty_background_ratio;
+--- linux-2.6.20.1.orig/mm/page-writeback.c
++++ linux-2.6.20.1/mm/page-writeback.c
+@@ -296,11 +296,21 @@ void balance_dirty_pages_ratelimited_nr(
+ }
+ EXPORT_SYMBOL(balance_dirty_pages_ratelimited_nr);
+-void throttle_vm_writeout(void)
++void throttle_vm_writeout(gfp_t gfp_mask)
+ {
+       long background_thresh;
+       long dirty_thresh;
++      if ((gfp_mask & (__GFP_FS|__GFP_IO)) != (__GFP_FS|__GFP_IO)) {
++              /*
++               * The caller might hold locks which can prevent IO completion
++               * or progress in the filesystem.  So we cannot just sit here
++               * waiting for IO to complete.
++               */
++              congestion_wait(WRITE, HZ/10);
++              return;
++      }
++
+         for ( ; ; ) {
+               get_dirty_limits(&background_thresh, &dirty_thresh, NULL);
+@@ -317,7 +327,6 @@ void throttle_vm_writeout(void)
+         }
+ }
+-
+ /*
+  * writeback at least _min_pages, and keep writing until the amount of dirty
+  * memory is less than the background threshold, or until we're all clean.
+--- linux-2.6.20.1.orig/mm/vmscan.c
++++ linux-2.6.20.1/mm/vmscan.c
+@@ -949,7 +949,7 @@ static unsigned long shrink_zone(int pri
+               }
+       }
+-      throttle_vm_writeout();
++      throttle_vm_writeout(sc->gfp_mask);
+       atomic_dec(&zone->reclaim_in_progress);
+       return nr_reclaimed;
diff --git a/queue-2.6.20/ueagle-atm.c-needs-sched.h.patch b/queue-2.6.20/ueagle-atm.c-needs-sched.h.patch
new file mode 100644 (file)
index 0000000..b6e5198
--- /dev/null
@@ -0,0 +1,32 @@
+From stable-bounces@linux.kernel.org Fri Feb 16 01:48:59 2007
+From: Randy Dunlap <randy.dunlap@oracle.com>
+Date: Fri, 16 Feb 2007 01:47:33 -0800
+Subject: ueagle-atm.c needs sched.h
+To: greg@kroah.com
+Cc: randy.dunlap@oracle.com, akpm@linux-foundation.org, stable@kernel.org
+Message-ID: <200702160947.l1G9lX3m026790@shell0.pdx.osdl.net>
+
+
+From: Randy Dunlap <randy.dunlap@oracle.com>
+
+Driver needs sched.h for try_to_freeze().
+
+Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
+Cc: Greg KH <greg@kroah.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/atm/ueagle-atm.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- linux-2.6.20.1.orig/drivers/usb/atm/ueagle-atm.c
++++ linux-2.6.20.1/drivers/usb/atm/ueagle-atm.c
+@@ -61,6 +61,7 @@
+ #include <linux/usb.h>
+ #include <linux/firmware.h>
+ #include <linux/ctype.h>
++#include <linux/sched.h>
+ #include <linux/kthread.h>
+ #include <linux/version.h>
+ #include <linux/mutex.h>
diff --git a/queue-2.6.20/video-aty-mach64_ct.c-fix-bogus-delay-loop.patch b/queue-2.6.20/video-aty-mach64_ct.c-fix-bogus-delay-loop.patch
new file mode 100644 (file)
index 0000000..bc1aa02
--- /dev/null
@@ -0,0 +1,51 @@
+From stable-bounces@linux.kernel.org Mon Mar  5 15:55:07 2007
+From: David Miller <davem@davemloft.net>
+Date: Mon, 5 Mar 2007 15:53:45 -0800
+Subject: video/aty/mach64_ct.c: fix bogus delay loop
+To: stable@kernel.org
+Cc: "Antonino A. Daplas" <adaplas@pol.net>
+Message-ID: <20070305155345.ee987168.akpm@linux-foundation.org>
+
+From: David Miller <davem@davemloft.net>
+
+[PATCH] video/aty/mach64_ct.c: fix bogus delay loop
+
+CT based mach64 cards were reported to hang on sparc64 boxes when
+compiled with gcc-4.1.x and later.
+
+Looking at this piece of code, it's no surprise.  A critical
+delay was implemented as an empty for() loop, and gcc 4.0.x
+and previous did not optimize it away, so we did get a delay.
+
+But gcc-4.1.x and later can optimize it away, and we get crashes.
+
+Use a real udelay() to fix this.  Fix verified on SunBlade100.
+
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: "Antonino A. Daplas" <adaplas@pol.net>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+
+---
+ drivers/video/aty/mach64_ct.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/video/aty/mach64_ct.c
++++ linux-2.6.20.1/drivers/video/aty/mach64_ct.c
+@@ -598,7 +598,6 @@ static void aty_resume_pll_ct(const stru
+       struct atyfb_par *par = info->par;
+       if (par->mclk_per != par->xclk_per) {
+-              int i;
+               /*
+               * This disables the sclk, crashes the computer as reported:
+               * aty_st_pll_ct(SPLL_CNTL2, 3, info);
+@@ -614,7 +613,7 @@ static void aty_resume_pll_ct(const stru
+                * helps for Rage Mobilities that sometimes crash when
+                * we switch to sclk. (Daniel Mantione, 13-05-2003)
+                */
+-              for (i=0;i<=0x1ffff;i++);
++              udelay(500);
+       }
+       aty_st_pll_ct(PLL_REF_DIV, pll->ct.pll_ref_div, par);