From: Philip Homburg Date: Fri, 27 Jan 2006 13:18:07 +0000 (+0000) Subject: Report resources to the kernel. X-Git-Tag: v3.1.2a~409 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/static/style.css?a=commitdiff_plain;h=cf7db577ae8575bca867a4e76f02361ef7f20e4c;p=minix.git Report resources to the kernel. --- diff --git a/drivers/pci/main.c b/drivers/pci/main.c index daba95b18..717fcdaaf 100644 --- a/drivers/pci/main.c +++ b/drivers/pci/main.c @@ -279,7 +279,7 @@ message *mp; devind= mp->m1_i1; - pci_reserve2(devind, names[i].name); + pci_reserve3(devind, mp->m_source, names[i].name); mp->m_type= OK; r= send(mp->m_source, mp); if (r != 0) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 68e465833..0e437ebf2 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -292,16 +292,74 @@ u16_t *didp; } /*===========================================================================* - * pci_reserve2 * + * pci_reserve3 * *===========================================================================*/ -PUBLIC void pci_reserve2(devind, name) +PUBLIC void pci_reserve3(devind, proc, name) int devind; +int proc; char *name; { + int i, r; + u8_t ilr; + struct io_range ior; + struct mem_range mr; + assert(devind <= nr_pcidev); assert(!pcidev[devind].pd_inuse); pcidev[devind].pd_inuse= 1; strcpy(pcidev[devind].pd_name, name); + + for (i= 0; i