rpms/kernel/F-7 linux-2.6-acpi-preserve-ebx-in-acpi_copy_wakeup_routine.patch, NONE, 1.1 linux-2.6-libata-pata_it821x-partly-fix-dma.patch, NONE, 1.1 kernel-2.6.spec, 1.3250, 1.3251

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Thu Jul 5 20:37:30 UTC 2007


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2094

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-acpi-preserve-ebx-in-acpi_copy_wakeup_routine.patch 
	linux-2.6-libata-pata_it821x-partly-fix-dma.patch 
Log Message:
* Thu Jul 05 2007 Chuck Ebbert <cebbert at redhat.com>
- ACPI: fix possible hang on suspend
- pata_it821x: partially fix DMA in RAID mode


linux-2.6-acpi-preserve-ebx-in-acpi_copy_wakeup_routine.patch:

--- NEW FILE linux-2.6-acpi-preserve-ebx-in-acpi_copy_wakeup_routine.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c8cbee61c9d53ee28473ad33bbb54f6a88f5e3af
Commit:     c8cbee61c9d53ee28473ad33bbb54f6a88f5e3af
Parent:     e5d2861f31474b373ce7754dc5122b414a176c64
Author:     Tian Kevin <kevin.tian at intel.com>
AuthorDate: Sat Jun 23 17:16:52 2007 -0700
Committer:  Linus Torvalds <torvalds at woody.linux-foundation.org>
CommitDate: Sun Jun 24 08:59:12 2007 -0700

    ACPI: preserve the ebx value in acpi_copy_wakeup_routine
    
    Register %ebx serves as the "global offset table base register" for
    position-independent code.  For absolute code, %ebx serves as a local
    register and has no specified role in the function calling sequence.  In
    either case, a function must preserve the register value for the caller.
    
    acpi_copy_wakeup_routine overrides %ebx without saving it, this may corrupt
    the called data.
    
    Kevin found that most time the value of Sx is saved in %esi, however
    sometimes compiler also uses %ebx.  When this happens, suspends fails since
    sleep value in ebx is changed by acpi_copy_wakeup_routine.
    
    The same funtion in X86_64 doesn't have this problem.
    
    Signed-off-by: Zhang Rui <rui.zhang at intel.com>
    Looks-okay-to: Pavel Machek <pavel at ucw.cz>
    Signed-off-by: Rafael J. Wysocki <rjw at sisk.pl>
    Cc: Len Brown <lenb at kernel.org>
    Acked-by: Andi Kleen <ak at suse.de>
    Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
 arch/i386/kernel/acpi/wakeup.S |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/i386/kernel/acpi/wakeup.S b/arch/i386/kernel/acpi/wakeup.S
index b781b38..a2295a3 100644
--- a/arch/i386/kernel/acpi/wakeup.S
+++ b/arch/i386/kernel/acpi/wakeup.S
@@ -230,6 +230,7 @@ bogus_magic:
 #
 ENTRY(acpi_copy_wakeup_routine)
 
+	pushl	%ebx
 	sgdt	saved_gdt
 	sidt	saved_idt
 	sldt	saved_ldt
@@ -263,6 +264,7 @@ ENTRY(acpi_copy_wakeup_routine)
 	movl	%edx, video_flags - wakeup_start (%eax)
 	movl	$0x12345678, real_magic - wakeup_start (%eax)
 	movl	$0x12345678, saved_magic
+	popl	%ebx
 	ret
 
 save_registers:

linux-2.6-libata-pata_it821x-partly-fix-dma.patch:

--- NEW FILE linux-2.6-libata-pata_it821x-partly-fix-dma.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=374abf2cb16a9df8be96675c606996458872e8b3
Commit:     374abf2cb16a9df8be96675c606996458872e8b3
Parent:     9f7897554eeca34ec23dd877cc27402bd327a1ce
Author:     Bartlomiej Zolnierkiewicz <bzolnier at gmail.com>
AuthorDate: Mon Jun 11 11:40:07 2007 +0200
Committer:  Jeff Garzik <jeff at garzik.org>
CommitDate: Wed Jun 20 19:56:21 2007 -0400

    pata_it821x: (partially) fix DMA in RAID mode
    
    Code intended to check DMA status was checking DMA command register.
    
    Moreover firmware seems to "forget" to set DMA capable bit for the
    slave device (at least in RAID mode but without ITE RAID volumes) so
    check device ID for DMA capable bit when deciding whether to use DMA
    and remove DMA status check completely.
    
    Thanks to Pavol Simo for the bugreport and testing the initial fix.
    
    This change unfortunately still doesn't fix DMA in RAID mode (which
    works fine with IDE it821x) but Alan is working on the missing pieces
    (pata_it821x vs libata EH issues).
    
    Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at gmail.com>
    Acked-by: Alan Cox <alan at redhat.com>
    Cc: Tejun Heo <htejun at gmail.com>
    Signed-off-by: Jeff Garzik <jeff at garzik.org>
    [remove copyright and version changes: <cebbert at redhat.com>]
---
 drivers/ata/pata_it821x.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index b3456d7..525c9c1 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -460,14 +461,8 @@ static unsigned int it821x_passthru_qc_issue_prot(struct ata_queued_cmd *qc)
 
 static int it821x_smart_set_mode(struct ata_port *ap, struct ata_device **unused)
 {
-	int dma_enabled = 0;
 	int i;
 
-	/* Bits 5 and 6 indicate if DMA is active on master/slave */
-	/* It is possible that BMDMA isn't allocated */
-	if (ap->ioaddr.bmdma_addr)
-		dma_enabled = ioread8(ap->ioaddr.bmdma_addr + ATA_DMA_CMD);
-
 	for (i = 0; i < ATA_MAX_DEVICES; i++) {
 		struct ata_device *dev = &ap->device[i];
 		if (ata_dev_enabled(dev)) {
@@ -476,7 +471,7 @@ static int it821x_smart_set_mode(struct ata_port *ap, struct ata_device **unused
 			dev->dma_mode = XFER_MW_DMA_0;
 			/* We do need the right mode information for DMA or PIO
 			   and this comes from the current configuration flags */
-			if (dma_enabled & (1 << (5 + i))) {
+			if (ata_id_has_dma(dev->id)) {
 				ata_dev_printk(dev, KERN_INFO, "configured for DMA\n");
 				dev->xfer_mode = XFER_MW_DMA_0;
 				dev->xfer_shift = ATA_SHIFT_MWDMA;


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3250
retrieving revision 1.3251
diff -u -r1.3250 -r1.3251
--- kernel-2.6.spec	5 Jul 2007 19:00:52 -0000	1.3250
+++ kernel-2.6.spec	5 Jul 2007 20:36:55 -0000	1.3251
@@ -642,6 +642,7 @@
 Patch2215: linux-2.6-libata-ich8m-add-pciid.patch
 Patch2216: linux-2.6-libata-pata_dma-param.patch
 Patch2217: linux-2.6-libata-ncq-blacklist-2.6.22-rc7.patch
+Patch2218: linux-2.6-libata-pata_it821x-partly-fix-dma.patch
 
 # ATA spindown
 Patch2220: linux-2.6-2110_scsi-sd-printing.patch
@@ -667,6 +668,7 @@
 Patch2500: linux-2.6-acpi-unblacklist-dell-gx240.patch
 Patch2501: linux-2.6-acpi-dock-oops.patch
 Patch2502: linux-2.6-acpi-boot-regression.patch
+Patch2503: linux-2.6-acpi-preserve-ebx-in-acpi_copy_wakeup_routine.patch
 
 # Excessive wakeups.
 Patch2600: linux-2.6-wakeups-hdaps.patch
@@ -1455,6 +1457,8 @@
 %patch2216 -p1
 # libata: update NCQ blacklist
 %patch2217 -p1
+# libata: partially fix dma for pata_it821x
+%patch2218 -p1
 
 # ATA spindown
 %patch2220 -p1
@@ -1485,6 +1489,8 @@
 %patch2501 -p1
 # Fix another ACPI boot regression.
 %patch2502 -p1
+# Fix possible breakage of ACPI suspend
+%patch2503 -p1
 
 # Fix excessive wakeups
 # Make hdaps timer only tick when in use.
@@ -2460,6 +2466,10 @@
 
 %changelog
 * Thu Jul 05 2007 Chuck Ebbert <cebbert at redhat.com>
+- ACPI: fix possible hang on suspend
+- pata_it821x: partially fix DMA in RAID mode
+
+* Thu Jul 05 2007 Chuck Ebbert <cebbert at redhat.com>
 - update libata NCQ blacklist
 - add the PATA DMA disable patch to CVS
 




More information about the fedora-extras-commits mailing list