pciif: do not depend on linux' msix_entries
PATCH 1/1 pciif: do not depend on linux' msix_entries
pciif: do not depend on linux' msix_entries, and use a conversion loop instead (already done in the frontend).
Signed-off-by Samuel Thibault <[email protected]>
drivers/xen/pciback/conf_space_capability_msi.c +14 -2
@@ -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; }
include/xen/interface/io/pciif.h +6 -1
@@ -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 {
[PATCH] pciif: do not depend on linux' msix_entries
Signed-off-by Samuel Thibault <[email protected]>
xen/include/public/io/pciif.h +5 -1
@@ -54,6 +54,10 @@*/ #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 +79,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 msix_entries[SH_INFO_MAX_VEC ]; };struct xen_pci_sharedinfo {
Fix the build for linux cs585 (Re: [PATCH] pciif: do not depend on linux' msix_entries)
Hi,
I failed to compile latest linux-2.6.18.8-xen. The modification below will fix the build of pciback.
Thanks,
--Yosuke
Signed-off-by Yosuke Iwamatsu <[email protected]>
drivers/xen/pciback/conf_space_capability_msi.c +2 -2
@@ -46,8 +46,8 @@ int pciback_enable_msix(struct pciback_dint i;for (i =0 ; i < op->value; i++) { - entries[i].entry = op.msix_entries[i].entry; - entries[i].vector = op.msix_entries[i].vector; + entries[i].entry = op->msix_entries[i].entry; + entries[i].vector = op->msix_entries[i].vector; } result =pci_enable_msix (dev, entries, op->value);