public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Tejun Heo <tj@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, linux-ide@vger.kernel.org
Subject: Re: [PATCH 1/2] ahci: disable correct irq for dymmy ports
Date: Thu, 11 Aug 2016 19:01:36 +0200	[thread overview]
Message-ID: <20160811170136.GB25717@lst.de> (raw)
In-Reply-To: <20160811163637.GD2695@mtj.duckdns.org>

On Thu, Aug 11, 2016 at 12:36:37PM -0400, Tejun Heo wrote:
> > diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
> > index 7461a58..dcf2c72 100644
> > --- a/drivers/ata/libahci.c
> > +++ b/drivers/ata/libahci.c
> > @@ -2524,7 +2524,7 @@ static int ahci_host_activate_multi_irqs(struct ata_host *host,
> >  
> >  		/* Do not receive interrupts sent by dummy ports */
> >  		if (!pp) {
> > -			disable_irq(irq + i);
> > +			disable_irq(irq);
> >  			continue;
> >  		}
> 
> I'm not following.  The driver at that point has irqs in the range
> [@irq, @irq + @host->n_ports - 1] and is trying to activate them and
> the above code block disables irq for a port which should be skipped.
> Why wouldn't it need to be indexed?

Because ahci_irq_vector does that indexing already.  This call changed
when Dan added ahci_irq_vector to support the MSI-X case - since
then ahci_irq_vector either does the base irq + index logic for
MSI or uses the msix_entries array for MSI-X, and irq contains the
result of that operation.

  reply	other threads:[~2016-08-11 17:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-11 14:26 two ahci fixes from code inspection Christoph Hellwig
2016-08-11 14:26 ` [PATCH 1/2] ahci: disable correct irq for dymmy ports Christoph Hellwig
2016-08-11 16:36   ` Tejun Heo
2016-08-11 17:01     ` Christoph Hellwig [this message]
2016-08-11 17:42       ` Tejun Heo
2016-08-11 14:26 ` [PATCH 2/2] ahci: also use a per-port lock for the multi-MSIX case Christoph Hellwig
2016-08-11 16:39   ` Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2016-08-11 14:24 [PATCH 1/2] ahci: disable correct irq for dymmy ports Christoph Hellwig

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=20160811170136.GB25717@lst.de \
    --to=hch@lst.de \
    --cc=linux-ide@vger.kernel.org \
    --cc=tj@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