mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Matthew Wilcox <matthew@wil.cx>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	"David S. Miller" <davem@davemloft.net>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix MSI-X with NIU cards
Date: Wed, 13 May 2009 14:49:22 +1000	[thread overview]
Message-ID: <1242190162.18059.82.camel@concordia> (raw)
In-Reply-To: <4A0A4F4A.7030101@jp.fujitsu.com>

[-- Attachment #1: Type: text/plain, Size: 1757 bytes --]

On Wed, 2009-05-13 at 13:40 +0900, Hidetoshi Seto wrote:
> Hidetoshi Seto wrote:
> > It seems that this issue was introduced by Matthew's commit:
> > commit f2440d9acbe866b917b16cc0f927366341ce9215
> > <quote>
> > @@ -435,11 +432,12 @@ static int msix_capability_init(struct pci_dev *dev,
> >                 entry->msi_attrib.is_msix = 1;
> >                 entry->msi_attrib.is_64 = 1;
> >                 entry->msi_attrib.entry_nr = j;
> > -               entry->msi_attrib.maskbit = 1;
> > -               entry->msi_attrib.masked = 1;
> >                 entry->msi_attrib.default_irq = dev->irq;
> >                 entry->msi_attrib.pos = pos;
> >                 entry->mask_base = base;
> > +               entry->masked = readl(base + j * PCI_MSIX_ENTRY_SIZE +
> > +                                       PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET);
> > +               msix_mask_irq(entry, 1);
> > 
> >                 list_add_tail(&entry->list, &dev->msi_list);
> >         }
> > </quote>
> > 
> > I'm not sure why Matthew changed it to read/write...
> 
> Sorry, I got it.
> 
> The problem is not the bit[0] for mask, but the reserved bits[31::01].
> According to the Spec:
> "31::01 Reserved 
>   After reset, the state of these bits must be 0.
>   However, for potential future use, software must preserve the value of
>   these reserved bits when modifying the value of other Vector Control bits.
>   If software modifies the value of these reserved bits, the result is
>   undefined."

Yes that's what I was referring to about it being out of spec.

So to work around the NIU bug and be in spec I think we need to enable
MSI, then read the mask bits, then write them back with the mask bit
set.

cheers


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2009-05-13  4:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-08 13:13 Matthew Wilcox
2009-05-11  1:21 ` Michael Ellerman
2009-05-11  5:36   ` David Miller
2009-05-11 14:30     ` Michael Ellerman
2009-05-11 23:40       ` David Miller
2009-05-11 23:59         ` Jesse Barnes
2009-05-12  2:21         ` Michael Ellerman
2009-05-13 10:07           ` Matthew Wilcox
2009-05-13  4:06   ` Hidetoshi Seto
2009-05-13  4:40     ` Hidetoshi Seto
2009-05-13  4:49       ` Michael Ellerman [this message]
2009-05-13  4:10 ` [PATCH] PCI MSI: Yet another fix for " Hidetoshi Seto
2009-05-13  5:13   ` David Miller
2009-05-13  4:54 ` [PATCH] PCI MSI: Yet another fix for MSI-X with NIU cards, v2 Hidetoshi Seto
2009-05-13  5:06   ` Hidetoshi Seto
2009-05-13  6:31     ` Michael Ellerman
2009-05-13 18:43     ` Matthew Wilcox
2009-05-14  6:22       ` Hidetoshi Seto

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=1242190162.18059.82.camel@concordia \
    --to=michael@ellerman.id.au \
    --cc=davem@davemloft.net \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=seto.hidetoshi@jp.fujitsu.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 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®