From: David Miller <davem@davemloft.net>
To: bzolnier@gmail.com
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 4/6] ide: allow ide_dev_read_id() to be called from the IRQ context
Date: Tue, 23 Jun 2009 16:22:56 -0700 (PDT) [thread overview]
Message-ID: <20090623.162256.190152758.davem@davemloft.net> (raw)
In-Reply-To: <200906232329.11648.bzolnier@gmail.com>
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Date: Tue, 23 Jun 2009 23:29:11 +0200
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] ide: allow ide_dev_read_id() to be called from the IRQ context
>
> * Un-static __ide_wait_stat().
>
> * Allow ide_dev_read_id() helper to be called from the IRQ context by
> adding irq_ctx flag and using mdelay()/__ide_wait_stat() when needed.
>
> * Switch ide_driveid_update() to set irq_ctx flag.
>
> This change is needed for the consecutive patch which fixes races in
> handling of user-space SET XFER commands but for improved bisectability
> and clarity it is better to do it in a separate patch.
>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> ---
> I'm not completely happy with this version of patch since I originally
> intended to unify ide_busy_sleep() with __ide_wait_stat() first..
This and patch #5 seems way overkill for the problem being solved.
All requests programmed into the device get synchronized through the
block request queue, even these raw taskfile commands.
It seems to me that it should be possible to use the block request
layer facilities to plug the queue, wait all executing commands to
complete and for the device to quiesce, then push this single RAW
command from the user to the device, and finally unplug the queue.
Alternatively, if the block request layer can't help, we can put a
mutex around submissions, and have this user RAW command submission
take that mutex.
Anything other than moving code that does significant delays into
interrupt context.
next prev parent reply other threads:[~2009-06-23 23:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-23 21:29 Bartlomiej Zolnierkiewicz
2009-06-23 23:22 ` David Miller [this message]
2009-06-24 1:36 ` Bartlomiej Zolnierkiewicz
2009-06-24 4:35 ` David Miller
2009-06-24 9:51 ` Bartlomiej Zolnierkiewicz
2009-06-24 9:55 ` David Miller
2009-06-24 10:48 ` Bartlomiej Zolnierkiewicz
2009-06-24 11:04 ` Bartlomiej Zolnierkiewicz
2009-06-24 13:05 ` Bartlomiej Zolnierkiewicz
2009-06-24 19:30 ` Jeff Garzik
2009-06-24 19:55 ` Bartlomiej Zolnierkiewicz
2009-07-01 16:35 ` Bartlomiej Zolnierkiewicz
2009-07-01 20:47 ` David Miller
2009-08-07 11:55 ` Bartlomiej Zolnierkiewicz
2009-08-07 16:01 ` David Miller
2009-08-07 17:27 ` Bartlomiej Zolnierkiewicz
2009-08-07 17:36 ` David Miller
2009-08-07 17:46 ` Bartlomiej Zolnierkiewicz
2009-08-07 18:09 ` David Miller
2009-08-07 18:35 ` 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=20090623.162256.190152758.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®