5 unsigned short origstate;
8 static struct pci_bother bothers[MAX_BOTHERS];
9 static int nbothers = 0;
11 int pci_bother_add(pci_dev_t *dev)
13 if (nbothers == MAX_BOTHERS)
16 bothers[nbothers].bus = dev->bus;
17 bothers[nbothers].dev = dev->dev;
18 bothers[nbothers].fn = dev->fn;
20 bothers[nbothers].origstate = pci_read16(dev->bus, dev->dev, dev->fn, 0x04);
31 for (i = 0; i < nbothers; i++)
32 pci_write16(bothers[i].bus, bothers[i].dev, bothers[i].fn, 0x0);
35 void pci_unbother_all()
39 for (i = 0; i < nbothers; i++)
40 pci_write16(bothers[i].bus, bothers[i].dev, bothers[i].fn, bothers[i].origstate);