All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Jeff Garzik <jeff@garzik.org>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Hans Werner <hwerner4@gmx.de>
Subject: Re: [PATCH #upstream-fixes 2/2] libata: implement spurious irq handling for SFF and apply it to piix
Date: Fri, 15 Jan 2010 12:39:35 +0900	[thread overview]
Message-ID: <4B4FE377.5090302@kernel.org> (raw)
In-Reply-To: <4B4F113B.30400@ru.mvista.com>

Hello,

On 01/14/2010 09:42 PM, Sergei Shtylyov wrote:
>> +static bool piix_irq_check(struct ata_port *ap)
>> +{
>> +    if (unlikely(!ap->ioaddr.bmdma_addr))
>> +        return false;
>> +
>> +    return ap->ops->bmdma_status(ap) & ATA_DMA_INTR;
>> +}
>> +
>>   
> 
>   I'm not at all sure that old, pre-ICH controllers set this bit also
> for the PIO mode commands, not only for DMA. And if you didn't make such
> assumption, I don't see why this can't be generic and placed into
> libata-sff.c instead...

Because different controllers have different mechanisms for detecting
pending IRQ?  Also, I think the current round is a bit dangerous in
that it might end up accessing registers while the driver is doing
polling PIO.  Having spurious IRQ clearing support would definitely be
helpful for such conditions but it might also lead to silent data
corruption which is worse.  I'll update the patch series so that the
mechanism only kicks in only when the controller is believed to be
completely idle.

Thanks.

-- 
tejun

  reply	other threads:[~2010-01-15  3:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-14  7:50 [PATCH #upstream-fixes 1/2] libata: cleanup ata_sff_interrupt() Tejun Heo
2010-01-14  7:53 ` [PATCH #upstream-fixes 2/2] libata: implement spurious irq handling for SFF and apply it to piix Tejun Heo
2010-01-14 12:42   ` Sergei Shtylyov
2010-01-15  3:39     ` Tejun Heo [this message]
2010-01-15 10:23       ` Sergei Shtylyov
2010-01-15 21:45         ` Tejun Heo
2010-01-14 10:20 ` [PATCH #upstream-fixes 1/2] libata: cleanup ata_sff_interrupt() Sergei Shtylyov
2010-01-15  3:36   ` Tejun Heo
2010-01-14 17:38 ` Jeff Garzik
2010-01-15  3:33   ` Tejun Heo

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=4B4FE377.5090302@kernel.org \
    --to=tj@kernel.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=hwerner4@gmx.de \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=sshtylyov@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 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.