From: Jens Axboe <axboe@suse.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-ide@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: PATCH (for comment): ide-cd possible race in PIO mode
Date: Wed, 17 Nov 2004 21:56:02 +0100 [thread overview]
Message-ID: <20041117205602.GO26240@suse.de> (raw)
In-Reply-To: <1100708728.420.68.camel@localhost.localdomain>
On Wed, Nov 17 2004, Alan Cox wrote:
> On Mer, 2004-11-17 at 15:37, Jens Axboe wrote:
> > > - HWIF(drive)->OUTB(WIN_PACKETCMD, IDE_COMMAND_REG);
> > > + spin_lock_irqsave(&ide_lock, flags);
> > > + HWIF(drive)->OUTBSYNC(WIN_PACKETCMD, IDE_COMMAND_REG);
> > > + ndelay(400);
> > > + spin_unlock_irqsave(&ide_lock, flags);
> > > return (*handler) (drive);
> > > }
> > > }
> >
> > What good does the lock do?
>
> The same as in ide_execute_command - make sure we don't take an IDE
> interrupt that tries to read the state during the delay. That is the old
> 2.4 "may drives shared IRQ random fails" fix and why the lock is taken
> in ide_execute_command.
Ah I see, makes sense. I didn't think about the shared irq case.
--
Jens Axboe
next prev parent reply other threads:[~2004-11-17 20:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-17 13:19 PATCH (for comment): ide-cd possible race in PIO mode Alan Cox
2004-11-17 15:37 ` Jens Axboe
2004-11-17 16:25 ` Alan Cox
2004-11-17 20:56 ` Jens Axboe [this message]
2004-11-22 7:58 ` Jens Axboe
2004-11-24 11:35 ` Alan Cox
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=20041117205602.GO26240@suse.de \
--to=axboe@suse.de \
--cc=alan@lxorguk.ukuu.org.uk \
--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.