// Remap all devices
remapDeviceAddresses(devices);
// Register all bridges
final DeviceManager devMan = getDevice().getManager();
for (PCIDevice dev : devices) {
if (dev.isBridge()) {
try {
devMan.register(dev);
} catch (DeviceAlreadyRegisteredException ex) {
log.error("Cannot start " + dev.getId(), ex);
} catch (DriverException ex) {
log.error("Cannot start " + dev.getId(), ex);
}
}
}
// Register all non-bridges
for (final PCIDevice dev : devices) {
if (!dev.isBridge()) {
WorkUtils.add(new Work(dev.getId()) {
public void execute() {
try {
devMan.register(dev);
} catch (DeviceAlreadyRegisteredException ex) {
log.error("Cannot start " + dev.getId(), ex);
} catch (DriverException ex) {
log.error("Cannot start " + dev.getId(), ex);
}