[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] pciback: Save the number of MSI-X entries to be copied later
# HG changeset patch # User Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> # Date 1456151136 -3600 # Mon Feb 22 15:25:36 2016 +0100 # Node ID d018557a9a503dcccad5d1a56b3dc3dfc072c73f # Parent c00c8be428cdccdd82de9a3adb8a5510d56c1270 pciback: Save the number of MSI-X entries to be copied later c/s 8135cf8b092723dbfcc611fe6fdcb3a36c9951c5 "xen/pciback: Save xen_pci_op commands before processing it" would copyback the processed values - which was great. However it missed the case that xen_pcibk_enable_msix - when completing would overwrite op->value (which had the number of MSI-X vectors requested) with the return value (which for success was zero). Hence the copy-back routine (which would use op->value) would copy exactly zero MSI-X vectors back. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Committed-by: Jan Beulich <jbeulich@xxxxxxxx> --- diff -r c00c8be428cd -r d018557a9a50 drivers/xen/pciback/pciback_ops.c --- a/drivers/xen/pciback/pciback_ops.c Mon Feb 22 15:23:05 2016 +0100 +++ b/drivers/xen/pciback/pciback_ops.c Mon Feb 22 15:25:36 2016 +0100 @@ -80,6 +80,9 @@ void pciback_do_op(void *data) struct pciback_device *pdev = data; struct pci_dev *dev; struct xen_pci_op *op = &pdev->op; +#ifdef CONFIG_PCI_MSI + unsigned int nr = 0; +#endif *op = pdev->sh_info->op; barrier(); @@ -107,6 +110,7 @@ void pciback_do_op(void *data) op->err = pciback_disable_msi(pdev, dev, op); break; case XEN_PCI_OP_enable_msix: + nr = op->value; op->err = pciback_enable_msix(pdev, dev, op); break; case XEN_PCI_OP_disable_msix: @@ -124,7 +128,7 @@ void pciback_do_op(void *data) if (op->cmd == XEN_PCI_OP_enable_msix && op->err == 0) { unsigned int i; - for (i = 0; i < op->value; i++) + for (i = 0; i < nr; i++) pdev->sh_info->op.msix_entries[i].vector = op->msix_entries[i].vector; } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |