public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
To: Matthew Wilcox <matthew@wil.cx>, "David S. Miller" <davem@davemloft.net>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] PCI MSI: Yet another fix for MSI-X with NIU cards
Date: Wed, 13 May 2009 13:10:17 +0900	[thread overview]
Message-ID: <4A0A4829.8080709@jp.fujitsu.com> (raw)
In-Reply-To: <20090508131333.GV8112@parisc-linux.org>

Hi David,

Could you review & test following patch for your issue?

Thanks,
H.Seto


The NIU device refuses to allow accesses to MSI-X registers before MSI-X
is enabled.  This patch fixes the problem by removing the read & write of
the mask register in msix_capability_init().  It will be safe since PCI
spac says the maskbit's state after reset is always 1 (= masked).

Reported-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
---
 drivers/pci/msi.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 6f2e629..b680a5b 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -455,9 +455,7 @@ static int msix_capability_init(struct pci_dev *dev,
 		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);
+		entry->masked = 1;
 
 		list_add_tail(&entry->list, &dev->msi_list);
 	}
-- 
1.6.3



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

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-08 13:13 [PATCH] Fix MSI-X with NIU cards 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
2009-05-13  4:10 ` Hidetoshi Seto [this message]
2009-05-13  5:13   ` [PATCH] PCI MSI: Yet another fix for " 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=4A0A4829.8080709@jp.fujitsu.com \
    --to=seto.hidetoshi@jp.fujitsu.com \
    --cc=davem@davemloft.net \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=matthew@wil.cx \
    /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