Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Oct 2003 11:11:58 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 40854 for review
Message-ID:  <200310301911.h9UJBw2j059259@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=40854

Change 40854 by jhb@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_ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310301911.h9UJBw2j059259>