Remove the second check for a 64-bit BAR value on a 32-bit system in

pci_add_map().  First, this condition is already handled earlier in
the function.  Second, as written the check would never fire as the
'start' value was overwritten with a long value (rman_get_start() returns
long) before the comparison was done.

Discussed with:	imp
MFC after:	2 weeks
This commit is contained in:
jhb 2008-08-05 21:04:00 +00:00
parent 997506ffa8
commit 24c4192859

View File

@ -2404,26 +2404,8 @@ pci_add_map(device_t pcib, device_t bus, device_t dev,
*/
resource_list_delete(rl, type, reg);
start = 0;
} else {
} else
start = rman_get_start(res);
if ((u_long)start != start) {
/*
* Wait a minute! This platform can't do this
* address.
*/
device_printf(bus,
"pci%d:%d.%d.%x bar %#x start %#jx, too many bits.",
pci_get_domain(dev), b, s, f, reg,
(uintmax_t)start);
/*
* Delete this resource and zero the BAR.
*/
resource_list_release(rl, bus, dev, type, reg, res);
resource_list_delete(rl, type, reg);
start = 0;
}
}
pci_write_config(dev, reg, start, 4);
if (ln2range == 64)
pci_write_config(dev, reg + 4, start >> 32, 4);