From: Kouya Shimura Subject: [PATCH] hvmloader: enable bus mastering of PCI device Date: Thu, 11 Dec 2008 21:38:55 +0900 Message-ID: <7kfxku51k0.fsf@pingu.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="AQhXMjTXVS" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --AQhXMjTXVS Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Without this, init routine in some PCI option ROM doesn't work well. Signed-off-by: Kouya Shimura --AQhXMjTXVS Content-Type: text/x-patch Content-Disposition: inline; filename="hvmloader_enable_busmaster.patch" Content-Transfer-Encoding: 7bit diff -r 6401c9533ef5 tools/firmware/hvmloader/hvmloader.c --- a/tools/firmware/hvmloader/hvmloader.c Wed Dec 10 14:05:41 2008 +0000 +++ b/tools/firmware/hvmloader/hvmloader.c Thu Dec 11 21:28:49 2008 +0900 @@ -269,6 +269,11 @@ static void pci_setup(void) printf("pci dev %02x:%x INT%c->IRQ%u\n", devfn>>3, devfn&7, 'A'+pin-1, isa_irq); } + + /* Enable bus mastering. */ + cmd = pci_readw(devfn, PCI_COMMAND); + cmd |= PCI_COMMAND_MASTER; + pci_writew(devfn, PCI_COMMAND, cmd); } /* Assign iomem and ioport resources in descending order of size. */ --AQhXMjTXVS Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --AQhXMjTXVS--