. pci driver now returns devices, even when they have been pci_reserve()d
[minix3.git] / lib / syslib / pci_reserve.c
blob3c0941ad0fbbf0ce1d3b9099c69ef84851a71f6e
1 /*
2 pci_reserve.c
3 */
5 #include "pci.h"
6 #include "syslib.h"
7 #include <minix/sysutil.h>
9 /*===========================================================================*
10 * pci_reserve *
11 *===========================================================================*/
12 PUBLIC void pci_reserve(devind)
13 int devind;
15 int r;
16 message m;
18 m.m_type= BUSC_PCI_RESERVE;
19 m.m1_i1= devind;
21 r= sendrec(pci_procnr, &m);
22 if (r != 0)
23 panic("pci", "pci_reserve: can't talk to PCI", r);
25 if (m.m_type != 0)
26 panic("pci", "pci_reserve: got bad reply from PCI", m.m_type);
29 /*===========================================================================*
30 * pci_reserve_ok *
31 *===========================================================================*/
32 PUBLIC int pci_reserve_ok(devind)
33 int devind;
35 int r;
36 message m;
38 m.m1_i1= devind;
40 return(_taskcall(pci_procnr, BUSC_PCI_RESERVE, &m));