|
@@ -202,7 +202,7 @@ static int nii_pci_open ( struct nii_nic *nii ) {
|
202
|
202
|
EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *acpi;
|
203
|
203
|
void *resource;
|
204
|
204
|
} desc;
|
205
|
|
- unsigned int bar;
|
|
205
|
+ int bar;
|
206
|
206
|
EFI_STATUS efirc;
|
207
|
207
|
int rc;
|
208
|
208
|
|
|
@@ -230,7 +230,7 @@ static int nii_pci_open ( struct nii_nic *nii ) {
|
230
|
230
|
/* Identify memory and I/O BARs */
|
231
|
231
|
nii->mem_bar = PCI_MAX_BAR;
|
232
|
232
|
nii->io_bar = PCI_MAX_BAR;
|
233
|
|
- for ( bar = 0 ; bar < PCI_MAX_BAR ; bar++ ) {
|
|
233
|
+ for ( bar = ( PCI_MAX_BAR - 1 ) ; bar >= 0 ; bar-- ) {
|
234
|
234
|
efirc = nii->pci_io->GetBarAttributes ( nii->pci_io, bar, NULL,
|
235
|
235
|
&desc.resource );
|
236
|
236
|
if ( efirc == EFI_UNSUPPORTED ) {
|