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

rpms/kernel/FC-4 linux-2.6-ide-tune-locking.patch, NONE, 1.1 kernel-2.6.spec, 1.1390, 1.1391



Author: davej

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

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-ide-tune-locking.patch 
Log Message:
Fix up locking in piix IDE driver whilst tuning chipset.



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/FC-4/kernel-2.6.spec,v
retrieving revision 1.1390
retrieving revision 1.1391
diff -u -r1.1390 -r1.1391
--- kernel-2.6.spec	5 Jul 2005 21:27:43 -0000	1.1390
+++ kernel-2.6.spec	11 Jul 2005 22:09:53 -0000	1.1391
@@ -326,6 +326,7 @@
 Patch1650: linux-2.6.11-acpi-thinkpad-c2c3.patch
 Patch1700: linux-2.6.10-revert-module-invalidparam.patch
 Patch1710: linux-2.6.12rc-ac-ide-fixes.patch
+Patch1711: linux-2.6-ide-tune-locking.patch
 Patch1720: linux-2.6.9-module_version.patch
 Patch1730: linux-2.6.9-spinlock-debug-panic.patch
 Patch1740: linux-2.6.11-default-elevator.patch
@@ -760,6 +761,7 @@
 %patch1700 -p1
 # Numerous IDE fixes.
 %patch1710 -p1
+%patch1711 -p1
 # Add missing MODULE_VERSION tags to some modules.
 %patch1720 -p1
 # Make spinlock debugging panic instead of continue.
@@ -1256,6 +1258,9 @@
 %endif
 
 %changelog
+* Mon Jul 11 2005 Dave Jones <davej redhat com>
+- Fix up locking in piix IDE driver whilst tuning chipset.
+
 * Tue Jul  5 2005 Dave Jones <davej redhat com>
 - Fixup ACPI IRQ routing bug that prevented booting for some folks.
 - Reenable ISA I2C drivers for x86-64.


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