- fix-ide-locking-error.patch removed from -mm tree

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

 



The patch titled

     Fix IDE locking error

has been removed from the -mm tree.  Its filename is

     fix-ide-locking-error.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: Fix IDE locking error
From: Alan Cox <alan@xxxxxxxxxx>


This bit us a few kernels ago, and for some reason never made it's way
upstream.

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=144743
Kernel panic - not syncing: drivers/ide/pci/piix.c:231:
spin_lock(drivers/ide/ide.c:c03cef28) already locked by driver/ide/ide-iops.c/1153.

Signed-off-by: Dave Jones <davej@xxxxxxxxxx>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@xxxxxxxxxxxxxx>
Cc: Dave Jones <davej@xxxxxxxxxx>
Cc: Jens Axboe <axboe@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/ide/pci/piix.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff -puN drivers/ide/pci/piix.c~fix-ide-locking-error drivers/ide/pci/piix.c
--- a/drivers/ide/pci/piix.c~fix-ide-locking-error
+++ a/drivers/ide/pci/piix.c
@@ -222,6 +222,8 @@ static void piix_tune_drive (ide_drive_t
 	unsigned long flags;
 	u16 master_data;
 	u8 slave_data;
+	static DEFINE_SPINLOCK(tune_lock);
+
 				 /* ISP  RTC */
 	u8 timings[][2]	= { { 0, 0 },
 			    { 0, 0 },
@@ -230,7 +232,13 @@ static void piix_tune_drive (ide_drive_t
 			    { 2, 3 }, };
 
 	pio = ide_get_best_pio_mode(drive, pio, 5, NULL);
-	spin_lock_irqsave(&ide_lock, flags);
+
+	/*
+	 * Master vs 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;
@@ -250,7 +258,7 @@ static void piix_tune_drive (ide_drive_t
 	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);
 }
 
 /**
_

Patches currently in -mm which might be from alan@xxxxxxxxxx are

origin.patch
make-drivers-scsi-pata_it821xcit821x_passthru_dev_select-static.patch
git-pcmcia.patch
git-scsi-misc.patch
stallion-clean-up.patch
old-ide-fix-sata-detection-for-cabling.patch
ide-clean-up-siimage.patch
ide-sc1200-debug-printk.patch
ide-fix-error-handling-for-drives-which-clear-the-fifo-on-error.patch
ide-housekeeping-on-ide-drivers.patch
ide-clean-up-pdc202xx_old-so-its-more-readable-done-so-i-could-work-on-libata-ports.patch
ide-set-err_stops_fifo-for-newer-promise-as-well.patch
ide-backport-piix-fixes-from-libata-into-the-legacy-driver.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux