[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/kernel/devel linux-2.6-ide-tune-locking.patch, NONE, 1.1 kernel-2.6.spec, 1.1427, 1.1428



Author: davej

Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv15398

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-ide-tune-locking.patch 
Log Message:
ide locking fix.


linux-2.6-ide-tune-locking.patch:
 piix.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

--- NEW FILE linux-2.6-ide-tune-locking.patch ---
--- linux-2.6.12/drivers/ide/pci/piix.c~	2005-07-11 10:23:24.637181320 +0100
+++ linux-2.6.12/drivers/ide/pci/piix.c	2005-07-11 10:23:24.637181320 +0100
@@ -203,6 +203,8 @@
 	}
 }
 
+static spinlock_t tune_lock = SPIN_LOCK_UNLOCKED;
+
 /**
  *	piix_tune_drive		-	tune a drive attached to a PIIX
  *	@drive: drive to tune
@@ -229,7 +231,12 @@
 			    { 2, 3 }, };
 
 	pio = ide_get_best_pio_mode(drive, pio, 5, NULL);
-	spin_lock_irqsave(&ide_lock, flags);
+	
+	/* Master v slave is synchronized above us but the slave register is
+	   shared by the two hwifs so the corner case of two slave timeouts in
+	   parallel must be locked */
+	   
+	spin_lock_irqsave(&tune_lock, flags);
 	pci_read_config_word(dev, master_port, &master_data);
 	if (is_slave) {
 		master_data = master_data | 0x4000;
@@ -249,7 +256,7 @@
 	pci_write_config_word(dev, master_port, master_data);
 	if (is_slave)
 		pci_write_config_byte(dev, slave_port, slave_data);
-	spin_unlock_irqrestore(&ide_lock, flags);
+	spin_unlock_irqrestore(&tune_lock, flags);
 }
 
 /**


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.1427
retrieving revision 1.1428
diff -u -r1.1427 -r1.1428
--- kernel-2.6.spec	12 Jul 2005 21:22:06 -0000	1.1427
+++ kernel-2.6.spec	12 Jul 2005 21:23:33 -0000	1.1428
@@ -345,6 +345,7 @@
 Patch1880: linux-2.6.11-radeon-backlight.patch
 Patch1890: linux-2.6.12-firedire-init-breakage.patch 
 Patch1910: linux-2.6.12-ns558-nodev-rmmod.patch
+Patch1920: linux-2.6-ide-tune-locking.patch
 
 Patch2000: linux-2.6.11-vm-taint.patch
 Patch2001: linux-2.6.9-vm-oomkiller-debugging.patch
@@ -788,6 +789,8 @@
 %patch1890 -p1
 # Fix oops in ns558 on rmmod
 %patch1910 -p1
+# Fix IDE locking bug.
+%patch1920 -p1
 
 #
 # VM related fixes.
@@ -1252,6 +1255,7 @@
 %changelog
 * Tue Jul 12 2005 Dave Jones <davej redhat com>
 - 2.6.13-rc2-git5
+- Fix IDE locking bug de jour.
 
 * Sun Jul 10 2005 Dave Jones <davej redhat com>
 - 2.6.13-rc2-git3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]