From: Matthew Wilcox <matthew@wil.cx>
To: Andrew Vasquez <andrew.vasquez@qlogic.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>,
David Somayajulu <david.somayajulu@qlogic.com>,
scsi <linux-scsi@vger.kernel.org>,
PCI <linux-pci@atrey.karlin.mff.cuni.cz>,
linux-driver@qlogic.com, gregkh <greg@kroah.com>
Subject: Re: qla_wxyz pci_set_mwi question
Date: Thu, 12 Apr 2007 12:53:47 -0600 [thread overview]
Message-ID: <20070412185347.GL26692@parisc-linux.org> (raw)
In-Reply-To: <20070412172038.GG10124@andrew-vasquezs-computer.local>
On Thu, Apr 12, 2007 at 10:20:38AM -0700, Andrew Vasquez wrote:
> No, the current logic doesn't make much sense at all, initialization
> should not continue if MWI is not set... I'll queue-up something like
> the patch below for our next batch-of-qla2xxx-updates.
Why should it fail? If there's a platform which can't support a
cacheline size that the qla2xyz card can handle, it should be able to
happily fall back to doing plain writes instead of MWIs. IMO, it should
just call pci_set_mwi() and ignore the result.
> pci_set_master(ha->pdev);
> - mwi = 0;
> - if (pci_set_mwi(ha->pdev))
> - mwi = PCI_COMMAND_INVALIDATE;
> + if (pci_set_mwi(ha->pdev) < 0)
> + return QLA_FUNCTION_FAILED;
>
> pci_read_config_word(ha->pdev, PCI_COMMAND, &w);
> - w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
> + w |= PCI_COMMAND_PARITY | PCI_COMMAND_SERR;
> pci_write_config_word(ha->pdev, PCI_COMMAND, w);
However, setting the msi bit here was redundant. pci_set_mwi() already
sets the PCI_COMMAND_INVALIDATE bit.
next prev parent reply other threads:[~2007-04-12 18:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-12 5:15 qla_wxyz pci_set_mwi question Randy Dunlap
2007-04-12 17:20 ` Andrew Vasquez
2007-04-12 18:53 ` Matthew Wilcox [this message]
2007-04-12 19:37 ` Andrew Vasquez
2007-04-12 20:04 ` Matthew Wilcox
2007-04-12 20:04 ` Matthew Wilcox
2007-04-13 2:34 ` Benjamin Herrenschmidt
2007-04-13 2:34 ` Benjamin Herrenschmidt
2007-04-13 2:40 ` Randy Dunlap
2007-04-13 2:40 ` Randy Dunlap
2007-04-13 2:43 ` Benjamin Herrenschmidt
2007-04-13 2:43 ` Benjamin Herrenschmidt
2007-05-03 17:44 ` Andrew Vasquez
2007-05-03 17:44 ` Andrew Vasquez
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=20070412185347.GL26692@parisc-linux.org \
--to=matthew@wil.cx \
--cc=andrew.vasquez@qlogic.com \
--cc=david.somayajulu@qlogic.com \
--cc=greg@kroah.com \
--cc=linux-driver@qlogic.com \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=linux-scsi@vger.kernel.org \
--cc=randy.dunlap@oracle.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.