mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
platform(x86): avoid multiple assignment messages
The new ported linux drivers multiple times trigger this assignment, whereby exactly one time is sufficient. Issue #4416 Issue #4450 Issue #4455
This commit is contained in:
parent
1dc92c49ed
commit
6994354b8f
@ -138,7 +138,8 @@ void Platform::Device_component::config_write(unsigned char address,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* assign device to device_pd */
|
/* assign device to device_pd */
|
||||||
if (address == Device_config::PCI_CMD_REG &&
|
if (!_device_assigned &&
|
||||||
|
address == Device_config::PCI_CMD_REG &&
|
||||||
(value & Device_config::PCI_CMD_DMA)) {
|
(value & Device_config::PCI_CMD_DMA)) {
|
||||||
|
|
||||||
try { _session.assign_device(this); }
|
try { _session.assign_device(this); }
|
||||||
@ -147,6 +148,7 @@ void Platform::Device_component::config_write(unsigned char address,
|
|||||||
catch (...) {
|
catch (...) {
|
||||||
error("assignment to device failed");
|
error("assignment to device failed");
|
||||||
}
|
}
|
||||||
|
_device_assigned = true;
|
||||||
_device_used = true;
|
_device_used = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@ class Platform::Device_component : public Rpc_object<Platform::Device>,
|
|||||||
Irq_session_component *_irq_session = nullptr;
|
Irq_session_component *_irq_session = nullptr;
|
||||||
unsigned short _irq_line;
|
unsigned short _irq_line;
|
||||||
bool _device_used { false };
|
bool _device_used { false };
|
||||||
|
bool _device_assigned { false };
|
||||||
Allocator &_global_heap;
|
Allocator &_global_heap;
|
||||||
|
|
||||||
class Io_mem : public Io_mem_connection,
|
class Io_mem : public Io_mem_connection,
|
||||||
|
Loading…
Reference in New Issue
Block a user