Shouldn''t pciback_field_is_dup(dev, field->offset) be scoped to include the base_offset as well? Currently with xen-3.0.4 the issue is this: Adding of PCI_PM_CTRL (at offset 4) to the ''config_fields list'' gets skipped because it ends up being a duplicate of PCI_COMMAND (at offset 4 as well). As a result when a PCI device behind a PCI frontend does a power up using pci_enable_device() the following message gets flashed on the console. pciback 0000:0b:00.3: Driver tried to write to a read-only configuration space field at offset 0x84, size 2. This may be harmless, but if you have problems with your device: 1) see permissive attribute in sysfs 2) report problems to the xen-devel mailing list along with details of your device obtained from lspci. Thanks, Jambunathan K. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Here is quick log from frontend debug showing this happening: pciback 0000:0b:00.3: added config field at offset 0x04 pciback 0000:0b:00.3: added config field at offset 0x3c pciback 0000:0b:00.3: added config field at offset 0x3d pciback 0000:0b:00.3: added config field at offset 0x0c pciback 0000:0b:00.3: added config field at offset 0x0d pciback 0000:0b:00.3: added config field at offset 0x0f pciback 0000:0b:00.3: added config field at offset 0x10 pciback 0000:0b:00.3: added config field at offset 0x14 pciback 0000:0b:00.3: added config field at offset 0x18 pciback 0000:0b:00.3: added config field at offset 0x1c pciback 0000:0b:00.3: added config field at offset 0x20 pciback 0000:0b:00.3: added config field at offset 0x24 pciback 0000:0b:00.3: added config field at offset 0x30 pciback 0000:0b:00.3: Found capability 0x1 at 0x80 pciback 0000:0b:00.3: added config field at offset 0x80 pciback 0000:0b:00.3: added config field at offset 0x82 <------ 0x80 + 4 missing here pciback 0000:0b:00.3: added config field at offset 0x86 pciback 0000:0b:00.3: added config field at offset 0x87 Thanks, Jambunathan K. Jambunathan K wrote:> Shouldn''t pciback_field_is_dup(dev, field->offset) be scoped to > include the base_offset as well? > > Currently with xen-3.0.4 the issue is this: > > Adding of PCI_PM_CTRL (at offset 4) to the ''config_fields list'' gets > skipped because it ends up being a duplicate of PCI_COMMAND (at offset > 4 as well). As a result when a PCI device behind a PCI frontend does > a power up using pci_enable_device() the following message gets > flashed on the console. > > pciback 0000:0b:00.3: Driver tried to write to a read-only > configuration space field at offset 0x84, size 2. This may be > harmless, but if you have problems with your device: > 1) see permissive attribute in sysfs > 2) report problems to the xen-devel mailing list along with details of > your device obtained from lspci. > > Thanks, > Jambunathan K. > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jambunathan K wrote:> Shouldn''t pciback_field_is_dup(dev, field->offset) be scoped to include > the base_offset as well?I think you''re right. Let me see what needs to be changed to accomplish the intended behavior. Thanks, Chris _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 8/3/07 19:39, "Jambunathan K" <jambunathan@netxen.com> wrote:> Shouldn''t pciback_field_is_dup(dev, field->offset) be scoped to include > the base_offset as well?Absolutely. Thanks for tracking it down! -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Chris
2007-Mar-09 21:26 UTC
[PATCH] [pciback] Re: [Xen-devel] pciback_field_is_dup needs a fix
This is a follow-up to pciback changes made earlier today that add several fixes: - remove superfluous call to pciback_field_is_dup() - fix a variable type mismatch in pciback_field_is_dup() - make readability improvements by using the OFFSET macro - revises quirk data output via the sysfs quirks node so that displayed offset information includes base_offset. Thanks to Jambunathan K. for giving such specific bug diagnosis. Signed-off-by: Chris Bookholt <hap10@tycho.ncsc.mil> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel