dde_linux: upgrade quota for wifi

Issue #755
This commit is contained in:
Alexander Boettcher 2015-04-09 17:00:06 +02:00 committed by Christian Helmuth
parent d37d2bd737
commit 4ead4484ec
1 changed files with 9 additions and 1 deletions

View File

@ -303,6 +303,9 @@ extern "C" int pci_register_driver(struct pci_driver *drv)
pci()->on_destruction(Pci::Connection::KEEP_OPEN);
found++;
} catch (Pci::Device::Quota_exceeded) {
Genode::env()->parent()->upgrade(pci()->cap(), "ram_quota=4096");
continue;
} catch (...) {
destroy(env()->heap(), pci_drv);
pci_drv = 0;
@ -361,7 +364,7 @@ extern "C" void *pci_ioremap_bar(struct pci_dev *dev, int bar)
try {
io_mem = new (env()->heap()) Io_mem_connection(start, size, 0);
} catch (...) {
PERR("Failed to request I/O memory: [%zx,%lx)", start, start + size);
PERR("Failed to request I/O memory: [%zx,%zx)", start, start + size);
return 0;
}
@ -458,6 +461,11 @@ Lx::backend_alloc(Genode::addr_t size, Genode::Cache_attribute cached)
cap = env()->ram_session()->alloc(size);
o = new (env()->heap()) Ram_object(cap);
} else {
/* transfer quota to pci driver, otherwise it will give us a exception */
char buf[32];
Genode::snprintf(buf, sizeof(buf), "ram_quota=%ld", size);
Genode::env()->parent()->upgrade(pci()->cap(), buf);
cap = pci()->alloc_dma_buffer(size);
o = new (env()->heap()) Dma_object(cap);
}