All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/6] ide: fix setting nIEN on idle devices
Date: Sun, 14 Dec 2008 00:39:32 +0100	[thread overview]
Message-ID: <20081213233932.4653.97088.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20081213233925.4653.58008.sendpatchset@localhost.localdomain>

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] ide: fix setting nIEN on idle devices

Fix do_ide_request() to operate on previous device / port instead of
the current one.  The original code was wrong since at least Feb 2002
(2.4.0 timeframe).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
all patches are for pata-2.6 tree

 drivers/ide/ide-io.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Index: b/drivers/ide/ide-io.c
===================================================================
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -724,7 +724,9 @@ void do_ide_request(struct request_queue
 	spin_lock_irq(&hwgroup->lock);
 
 	if (!ide_lock_hwgroup(hwgroup)) {
+		ide_hwif_t *prev_port;
 repeat:
+		prev_port = hwgroup->hwif;
 		hwgroup->rq = NULL;
 
 		if (drive->dev_flags & IDE_DFLAG_SLEEPING) {
@@ -734,13 +736,13 @@ repeat:
 			}
 		}
 
-		if (hwif != hwgroup->hwif) {
+		if (hwif != prev_port) {
 			/*
-			 * set nIEN for previous hwif, drives in the
+			 * set nIEN for previous port, drives in the
 			 * quirk_list may not like intr setups/cleanups
 			 */
-			if (drive->quirk_list == 0)
-				hwif->tp_ops->set_irq(hwif, 0);
+			if (hwgroup->drive->quirk_list == 0)
+				prev_port->tp_ops->set_irq(prev_port, 0);
 		}
 		hwgroup->hwif = hwif;
 		hwgroup->drive = drive;

  reply	other threads:[~2008-12-13 23:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-13 23:39 [PATCH 0/6] ide: final bits of struct hwgroup_s -> struct ide_host change Bartlomiej Zolnierkiewicz
2008-12-13 23:39 ` Bartlomiej Zolnierkiewicz [this message]
2008-12-14  7:06   ` [PATCH 1/6] ide: fix setting nIEN on idle devices Willy Tarreau
2008-12-16 18:57     ` Bartlomiej Zolnierkiewicz
2008-12-16 20:24       ` Willy Tarreau
2008-12-13 23:39 ` [PATCH 2/6] ide: add ->cur_port to struct ide_host and use it for serialized hosts Bartlomiej Zolnierkiewicz
2008-12-13 23:39 ` [PATCH 3/6] ide: use per-port IRQ handlers Bartlomiej Zolnierkiewicz
2008-12-13 23:39 ` [PATCH 4/6] ide: remove hwgroup->hwif and {drive,hwif}->next Bartlomiej Zolnierkiewicz
2008-12-13 23:39 ` [PATCH 5/6] ide: use lock bitops for ports serialization Bartlomiej Zolnierkiewicz
2008-12-13 23:40 ` [PATCH 6/6] ide: merge ide_hwgroup_t with ide_hwif_t Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081213233932.4653.97088.sendpatchset@localhost.localdomain \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.