On Fri, Jan 19, 2007 at 12:54:51AM +0100, Pavel Machek wrote:
> Hi1
>
> > I get the following compilation error from the current CVS on x86_64:
> >
> > s2ram.c: In function ???find_vga???:
> > s2ram.c:160: error: ???PCI_FILL_CLASS??? undeclared (first use in this
> > function)
> > s2ram.c:160: error: (Each undeclared identifier is reported only once
> > s2ram.c:160: error: for each function it appears in.)
> > s2ram.c:161: error: ???struct pci_dev??? has no member named
> > ???device_class???
> > s2ram.c: In function ???s2ram_resume???:
> > s2ram.c:269: error: ???struct pci_dev??? has no member named
> > ???device_class???
> >
> > What's missing?
>
> Was it "you need newer pci utils to do this"? Feel free to comment the
> test out...
--- s2ram.c
+++ s2ram.c
@@ -153,12 +153,14 @@
int find_vga(void)
{
struct pci_dev *dev;
+ unsigned int class;
pci_scan_bus(pacc); /* We want to get the list of devices */
for (dev=pacc->devices; dev; dev=dev->next) {
- pci_fill_info(dev, PCI_FILL_IDENT | PCI_FILL_CLASS);
- if (dev->device_class == 0x300)
+ pci_fill_info(dev, PCI_FILL_IDENT);
+ class = pci_read_word(dev, PCI_CLASS_DEVICE);
+ if (class == 0x300)
break;
}
@@ -266,7 +268,7 @@
void s2ram_resume(void)
{
- if ((flags & PCI_SAVE) && vga_dev.device_class == 0x300) {
+ if (flags & PCI_SAVE) {
printf("restoring PCI config of device %02x:%02x.%d\n",
vga_dev.bus, vga_dev.dev, vga_dev.func);
restore_vga_pci();
One problem is, i never actually tested that :-) This is why it is not
committed yet (it compiles, but... :-)
--
Stefan Seyfried
QA / R&D Team Mobile Devices | "Any ideas, John?"
SUSE LINUX Products GmbH, Nürnberg | "Well, surrounding them's out."
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Suspend-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/suspend-devel