linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: bzolnier@gmail.com
Cc: linux-ide@vger.kernel.org, mcherkashin@ru.mvista.com
Subject: [PATCH] ide: disable drive interrupts in ide_driveid_update()
Date: Wed, 9 Jul 2008 20:48:48 +0400	[thread overview]
Message-ID: <200807092048.48078.sshtylyov@ru.mvista.com> (raw)

From: Mikhail Cherkashin <mcherkashin@ru.mvista.com>

Since ide_driveid_update() uses polling to execute the IDENTIFY DEVICE command
but clears nIEN bit in the control register and doesn't mask the IDE interrupt,
the latter does happen and lead to the corresponding message to appear:

ide0: unexpected interrupt, status=0x58, count=1

when e.g. running hdparm with option -X with a non-PCI IDE driver...

Signed-off-by: Mikhail Cherkashin <mcherkashin@ru.mvista.com>
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

---
No attempt is made to respect the drive's quirkiness which is probably not
correct but the 'drive->quirk_list' matter is somewhat confusing...

 drivers/ide/ide-iops.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 0daf923..c2dd20a 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -689,7 +689,7 @@ int ide_driveid_update(ide_drive_t *drive)
 	 */
 
 	SELECT_MASK(drive, 1);
-	ide_set_irq(drive, 1);
+	ide_set_irq(drive, 0);
 	msleep(50);
 	hwif->OUTBSYNC(drive, WIN_IDENTIFY, hwif->io_ports.command_addr);
 	timeout = jiffies + WAIT_WORSTCASE;


             reply	other threads:[~2008-07-09 16:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-09 16:48 Sergei Shtylyov [this message]
2008-07-11 19:11 ` [PATCH] ide: disable drive interrupts in ide_driveid_update() 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=200807092048.48078.sshtylyov@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=mcherkashin@ru.mvista.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).