Skip to content

Commit

Permalink
platform(x86): avoid multiple assignment messages
Browse files Browse the repository at this point in the history
The new ported linux drivers multiple times trigger this assignment,
whereby exactly one time is sufficient.

Issue genodelabs#4416
Issue genodelabs#4450
Issue genodelabs#4455
  • Loading branch information
alex-ab committed Mar 31, 2022
1 parent 258d822 commit ff70c32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion repos/os/src/drivers/platform/legacy/x86/pci_device.cc
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ void Platform::Device_component::config_write(unsigned char address,
}

/* assign device to device_pd */
if (address == Device_config::PCI_CMD_REG &&
if (!_device_used &&
address == Device_config::PCI_CMD_REG &&
(value & Device_config::PCI_CMD_DMA)) {

try { _session.assign_device(this); }
Expand Down

1 comment on commit ff70c32

@alex-ab
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chelmuth: please consider for staging

Please sign in to comment.