Rev | Line | |
---|
[9] | 1 | /*
|
---|
| 2 | pci_ids.c
|
---|
| 3 | */
|
---|
| 4 |
|
---|
| 5 | #include "pci.h"
|
---|
| 6 | #include "syslib.h"
|
---|
| 7 | #include <minix/sysutil.h>
|
---|
| 8 |
|
---|
| 9 | /*===========================================================================*
|
---|
| 10 | * pci_ids *
|
---|
| 11 | *===========================================================================*/
|
---|
| 12 | PUBLIC void pci_ids(devind, vidp, didp)
|
---|
| 13 | int devind;
|
---|
| 14 | u16_t *vidp;
|
---|
| 15 | u16_t *didp;
|
---|
| 16 | {
|
---|
| 17 | int r;
|
---|
| 18 | message m;
|
---|
| 19 |
|
---|
| 20 | m.m_type= BUSC_PCI_IDS;
|
---|
| 21 | m.m1_i1= devind;
|
---|
| 22 |
|
---|
| 23 | r= sendrec(pci_procnr, &m);
|
---|
| 24 | if (r != 0)
|
---|
| 25 | panic("pci", "pci_ids: can't talk to PCI", r);
|
---|
| 26 |
|
---|
| 27 | if (m.m_type != 0)
|
---|
| 28 | panic("pci", "pci_ids: got bad reply from PCI", m.m_type);
|
---|
| 29 | *vidp= m.m1_i1;
|
---|
| 30 | *didp= m.m1_i2;
|
---|
| 31 | printf("pci_ids: %04x/%04x\n", *vidp, *didp);
|
---|
| 32 | }
|
---|
| 33 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.