Re: Allocation of resources - VF BARs...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have realized this problem for a while but didn't expect it comes so early...

For now, please use following workaround, I'll cleanup the code in the next take.

Thanks,
Yu

diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index 7685c6b..f40852e 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -492,7 +492,6 @@ int pci_iov_init(struct pci_dev *dev)
 		i += __pci_read_base(dev, pci_bar_unknown, res, pos);
 		if (!res->flags)
 			continue;
-		res->flags &= ~IORESOURCE_SIZEALIGN;
 		res->end = res->start + resource_size(res) * total - 1;
 	}



Venugopal Busireddy wrote:
Thank you for the quick response...

I have attached the trace. Please excuse the extra debug messages you
will see... Those were added by me while debugging the problem.

Venu


-----Original Message-----
From: linux-pci-owner@xxxxxxxxxxxxxxx [mailto:linux-pci-
owner@xxxxxxxxxxxxxxx] On Behalf Of Matthew Wilcox
Sent: Tuesday, November 18, 2008 01:03 PM
To: Venugopal Busireddy
Cc: linux-pci@xxxxxxxxxxxxxxx
Subject: Re: Allocation of resources - VF BARs...

On Tue, Nov 18, 2008 at 05:59:43PM +0000, Venu Busireddy wrote:
During the resource setup phase, I have noticed that
pci_update_resource()
gets called with resno 0 (BAR 0), 6 (PCI_ROM_RESOURCE), 2 (BAR 2), 7
(VF BAR 0), 9 (VF BAR 2), 11 (VF BAR 4), and 4 (BAR 4), in that
order.
resno 0 (BAR 0) gets bus range 0x80000000-0x807fffff allocated to
it.
resno 6 (PCI_ROM_RESOURCE) gets bus range 0x80800000-0x8087ffff.

resno 2 (BAR 2) gets bus range 0x80880000-0x80880fff.

So far so good...

Now, resno 7 (VF BAR 0) gets bus range 0x80881000-0x88880fff
allocated
to it. But when 0x8088100c is written to VF BAR 0, the adpater
returns
0x8080000c. The adapter seems to expect the region to fall on a 8MB
boundary, but the address we assigned falls on a 4K boundary.
Could you recompile with CONFIG_PCI_DEBUG=y and send all the resulting
messages from dmesg?  You may need to increase the size of your
CONFIG_LOG_BUF_SHIFT to fit all the extra messages in.

--
Matthew Wilcox				Intel Open Source
Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
To unsubscribe from this list: send the line "unsubscribe linux-pci"
in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux