linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 15/20] ide: don't enable local IRQs for PIO-in in driver_cmd_intr()
Date: Mon, 10 Dec 2007 16:39:38 +0300	[thread overview]
Message-ID: <475D419A.1050506@ru.mvista.com> (raw)
In-Reply-To: <200712092218.30672.bzolnier@gmail.com>

Bartlomiej Zolnierkiewicz wrote:

> Don't enable local IRQs for PIO-in protocol in driver_cmd_intr().

> While at it:

> * Remove redundant rq->cmd_type check.

> * Read status register after enabling local IRQs for no-data protocol.

> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

> Index: b/drivers/ide/ide-io.c
> ===================================================================
> --- a/drivers/ide/ide-io.c
> +++ b/drivers/ide/ide-io.c
> @@ -638,17 +638,18 @@ static ide_startstop_t drive_cmd_intr (i
>  {
>  	struct request *rq = HWGROUP(drive)->rq;
>  	ide_hwif_t *hwif = HWIF(drive);
> -	u8 *args = (u8 *) rq->buffer;
> -	u8 stat = hwif->INB(IDE_STATUS_REG);
> +	u8 *args = (u8 *)rq->buffer, pio_in = (args && args[3]) ? 1 : 0, stat;
>  
> -	local_irq_enable_in_hardirq();
> -	if (rq->cmd_type == REQ_TYPE_ATA_CMD &&
> -	    (stat & DRQ_STAT) && args && args[3]) {
> +	if (pio_in) {
>  		u8 io_32bit = drive->io_32bit;
> +		stat = hwif->INB(IDE_STATUS_REG);

    You've lost DRQ=1 check (which is returned in the next patch however)...

MBR, Sergei

  reply	other threads:[~2007-12-10 13:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-09 21:18 [PATCH 15/20] ide: don't enable local IRQs for PIO-in in driver_cmd_intr() Bartlomiej Zolnierkiewicz
2007-12-10 13:39 ` Sergei Shtylyov [this message]
2007-12-12 21:28   ` Bartlomiej Zolnierkiewicz
2007-12-13 12:59     ` Sergei Shtylyov

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=475D419A.1050506@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).