This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PCI: allocate memory resources


Hi,

There appears to be a bug in cyg_pci_configure_device that was causing the allocation of memory resources to be skipped. I think the intention of the code is to skip BARs that had a zero size but the code was checking the (as yet unconfigured) address instead.

2004-11-03 David Vrabel <dvrabel@arcom.com>

	* src/pci.c (cyg_pci_configure_device): Fix bug which caused
	memory resources to be unallocated.
--
David Vrabel, Design Engineer

Arcom, Clifton Road           Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK         Web: http://www.arcom.com/
Index: io/pci/current/src/pci.c
===================================================================
RCS file: /var/cvs/ecos/packages/io/pci/current/src/pci.c,v
retrieving revision 1.5
diff -u -B -p -r1.5 pci.c
--- io/pci/current/src/pci.c	14 Oct 2004 13:23:44 -0000	1.5
+++ io/pci/current/src/pci.c	3 Nov 2004 11:23:00 -0000
@@ -677,7 +677,7 @@ cyg_pci_configure_device( cyg_pci_device
 
     if (dev_info->num_bars > 0) {
         for (bar = 0; bar < CYG_PCI_MAX_BAR; bar++) {
-            if (!dev_info->base_address[bar]) {
+            if (!dev_info->base_size[bar]) {
                 continue;
             }
 	    flags = dev_info->base_size[bar];

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]