[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [VTD] don't enable device ATS if root port does not support it
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1254820274 -3600 # Node ID e39acea851f48598114a3c8ab90afc5a97b33952 # Parent 56ab22093d645c33f0e6f878362ac9b3eb1b4226 [VTD] don't enable device ATS if root port does not support it Fixed a bug in the code that enables ATS capability on the device even when root port does not support it. Signed-off-by: Allen Kay <allen.m.kay@xxxxxxxxx> --- xen/drivers/passthrough/vtd/x86/ats.c | 29 ++++++++++++++--------------- 1 files changed, 14 insertions(+), 15 deletions(-) diff -r 56ab22093d64 -r e39acea851f4 xen/drivers/passthrough/vtd/x86/ats.c --- a/xen/drivers/passthrough/vtd/x86/ats.c Tue Oct 06 10:09:21 2009 +0100 +++ b/xen/drivers/passthrough/vtd/x86/ats.c Tue Oct 06 10:11:14 2009 +0100 @@ -118,8 +118,10 @@ int enable_ats_device(int seg, int bus, u16 queue_depth; int pos; + if ( acpi_find_matched_atsr_unit(bus, devfn) ) + return 0; + pos = pci_find_ext_capability(seg, bus, devfn, PCI_EXT_CAP_ID_ATS); - if ( !pos ) { dprintk(XENLOG_ERR VTDPREFIX, "ats capability not found %x:%x:%x\n", @@ -135,21 +137,18 @@ int enable_ats_device(int seg, int bus, PCI_FUNC(devfn), pos + ATS_REG_CAP); queue_depth = value & ATS_QUEUE_DEPTH_MASK; - /* BUGBUG: add back seg when multi-seg platform support is enabled */ - value = pci_conf_read16(bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pos + ATS_REG_CTL); + value = pci_conf_read16(bus, PCI_SLOT(devfn), + PCI_FUNC(devfn), pos + ATS_REG_CTL); value |= ATS_ENABLE; - - /* BUGBUG: add back seg when multi-seg platform support is enabled */ - pci_conf_write16(bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pos + ATS_REG_CTL, value); - - if ( acpi_find_matched_atsr_unit(bus, devfn) ) - { - pdev = xmalloc(struct pci_ats_dev); - pdev->bus = bus; - pdev->devfn = devfn; - pdev->ats_queue_depth = queue_depth; - list_add(&(pdev->list), &ats_devices); - } + pci_conf_write16(bus, PCI_SLOT(devfn), PCI_FUNC(devfn), + pos + ATS_REG_CTL, value); + + pdev = xmalloc(struct pci_ats_dev); + pdev->bus = bus; + pdev->devfn = devfn; + pdev->ats_queue_depth = queue_depth; + list_add(&(pdev->list), &ats_devices); + return pos; } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |