PERFORCE change 40854 for review
John Baldwin
jhb at FreeBSD.org
Thu Oct 30 11:12:01 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=40854
Change 40854 by jhb at jhb_laptop on 2003/10/30 11:11:56
- Fix pci_resume() compile.
- Export pci_resume() and pci_suspend().
Affected files ...
.. //depot/projects/power/sys/dev/pci/pci.c#4 edit
.. //depot/projects/power/sys/dev/pci/pci_private.h#4 edit
Differences ...
==== //depot/projects/power/sys/dev/pci/pci.c#4 (text+ko) ====
@@ -74,8 +74,6 @@
device_t dev);
static int pci_probe(device_t dev);
static int pci_attach(device_t dev);
-static int pci_suspend(device_t dev);
-static int pci_resume(device_t dev);
static void pci_load_vendor_data(void);
static int pci_describe_parse_line(char **ptr, int *vendor,
int *device, char **desc);
@@ -933,7 +931,7 @@
return (bus_generic_attach(dev));
}
-static int
+int
pci_suspend(device_t dev)
{
int numdevs;
@@ -957,7 +955,7 @@
return (bus_generic_suspend(dev));
}
-static int
+int
pci_resume(device_t dev)
{
int numdevs;
@@ -1626,7 +1624,8 @@
pci_write_config(dev, PCIR_MINGNT, dinfo->cfg.mingnt, 1);
pci_write_config(dev, PCIR_MAXLAT, dinfo->cfg.maxlat, 1);
if (dinfo->cfg.intpin > 0 && PCI_INTERRUPT_VALID(dinfo->cfg.intline))
- dinfo->cfg.intline = PCI_ASSIGN_INTERRUPT(dev, child);
+ dinfo->cfg.intline = PCI_ASSIGN_INTERRUPT(
+ device_get_parent(dev), dev);
pci_write_config(dev, PCIR_INTLINE, dinfo->cfg.intline, 1);
pci_write_config(dev, PCIR_INTPIN, dinfo->cfg.intpin, 1);
}
==== //depot/projects/power/sys/dev/pci/pci_private.h#4 (text+ko) ====
@@ -75,4 +75,5 @@
char *buf, size_t buflen);
int pci_assign_interrupt_method(device_t dev, device_t child);
int pci_resume(device_t dev);
+int pci_suspend(device_t dev);
#endif /* _PCI_PRIVATE_H_ */
More information about the p4-projects
mailing list