From: Samuel Thibault <samuel.thibault@eu.citrix.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] pciif: do not depend on linux' msix_entries
Date: Wed, 2 Jul 2008 13:31:34 +0100 [thread overview]
Message-ID: <20080702123134.GD4714@implementation.uk.xensource.com> (raw)
pciif: do not depend on linux' msix_entries, and use a conversion loop
instead (already done in the frontend).
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
diff -r 3643a33de277 drivers/xen/pciback/conf_space_capability_msi.c
--- a/drivers/xen/pciback/conf_space_capability_msi.c Mon Jun 30 16:14:04 2008 +0100
+++ b/drivers/xen/pciback/conf_space_capability_msi.c Wed Jul 02 12:46:30 2008 +0100
@@ -39,9 +39,21 @@
{
int result;
- result = pci_enable_msix(dev, op->msix_entries, op->value);
+ if (op->value > SH_INFO_MAX_VEC)
+ return -EINVAL;
+ else {
+ struct msix_entry entries[op->value];
+ int i;
- op->value = result;
+ for (i = 0; i < op->value; i++) {
+ entries[i].entry = op.msix_entries[i].entry;
+ entries[i].vector = op.msix_entries[i].vector;
+ }
+
+ result = pci_enable_msix(dev, entries, op->value);
+ op->value = result;
+ }
+
return result;
}
diff -r 3643a33de277 include/xen/interface/io/pciif.h
--- a/include/xen/interface/io/pciif.h Mon Jun 30 16:14:04 2008 +0100
+++ b/include/xen/interface/io/pciif.h Wed Jul 02 12:46:30 2008 +0100
@@ -54,6 +54,11 @@
*/
#define SH_INFO_MAX_VEC 128
+struct xen_msix_entry {
+ uint16_t vector;
+ uint16_t entry;
+};
+
struct xen_pci_op {
/* IN: what action to perform: XEN_PCI_OP_* */
uint32_t cmd;
@@ -75,7 +80,7 @@
/* IN: Contains extra infor for this operation */
uint32_t info;
/*IN: param for msi-x */
- struct msix_entry msix_entries[SH_INFO_MAX_VEC];
+ struct xen_msix_entry xen_msix_entries[SH_INFO_MAX_VEC];
};
struct xen_pci_sharedinfo {
next reply other threads:[~2008-07-02 12:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-02 12:31 Samuel Thibault [this message]
2008-07-02 12:32 ` [PATCH] pciif: do not depend on linux' msix_entries Samuel Thibault
2008-07-03 5:28 ` Fix the build for linux cs585 (Re: [PATCH] pciif: do not depend on linux' msix_entries) Yosuke Iwamatsu
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=20080702123134.GD4714@implementation.uk.xensource.com \
--to=samuel.thibault@eu.citrix.com \
--cc=xen-devel@lists.xensource.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.