mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
usb: effectively request all IRQ capabilities
Thanks @alex-ab for the remote help.
This commit is contained in:
parent
7dd156c8b6
commit
1f62446b65
@ -94,6 +94,15 @@ class Io_port
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Virtual IRQ number (monotonically increasing)
|
||||
*/
|
||||
static unsigned virq_num()
|
||||
{
|
||||
static unsigned instance = 128;
|
||||
return ++instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Scan PCI bus and probe for HCDs
|
||||
*/
|
||||
@ -139,8 +148,15 @@ class Pci_driver : public Genode::List<Pci_driver>::Element
|
||||
_dev->dev.dma_mask = &dma_mask;
|
||||
_dev->dev.coherent_dma_mask = ~0;
|
||||
|
||||
/* read interrupt line */
|
||||
_dev->irq = client.config_read(IRQ, Device::ACCESS_8BIT);
|
||||
/*
|
||||
* We initialize the IRQ line with a virtual number to ensure that
|
||||
* each device gets a unique number and, hence, requests its
|
||||
* associated IRQ capability at the platform driver. Consequently,
|
||||
* we give a away the questionable option to implement IRQ sharing
|
||||
* locally and leave it to the platform driver, which just uses
|
||||
* signalling anyway.
|
||||
*/
|
||||
_dev->irq = virq_num();
|
||||
|
||||
/* hide ourselfs in bus structure */
|
||||
_dev->bus = (struct pci_bus *)this;
|
||||
|
Loading…
Reference in New Issue
Block a user