mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 22:47:50 +00:00
parent
6e66e51088
commit
1018dbc89a
@ -184,7 +184,10 @@ struct Pci_driver
|
||||
|
||||
int first_device(int *bus, int *dev, int *fun)
|
||||
{
|
||||
_cap = _pci.first_device(CLASS_NETWORK, CLASS_MASK);
|
||||
_cap = Genode::retry<Platform::Session::Out_of_metadata>(
|
||||
[&] () { return _pci.first_device(CLASS_NETWORK, CLASS_MASK); },
|
||||
[&] () { _pci.upgrade_ram(4096); });
|
||||
|
||||
if (!_cap.valid())
|
||||
return -1;
|
||||
|
||||
@ -197,8 +200,10 @@ struct Pci_driver
|
||||
int result = -1;
|
||||
|
||||
_last_cap = _cap;
|
||||
_cap = Genode::retry<Platform::Session::Out_of_metadata>(
|
||||
[&] () { return _pci.next_device(_cap, CLASS_NETWORK, CLASS_MASK); },
|
||||
[&] () { _pci.upgrade_ram(4096); });
|
||||
|
||||
_cap = _pci.next_device(_cap, CLASS_NETWORK, CLASS_MASK);
|
||||
if (_cap.valid()) {
|
||||
_bus_address(bus, dev, fun);
|
||||
result = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user