Re: [PATCH] fix tulip suspend/resume

From: Pavel Machek
Date: Tue Jun 07 2005 - 15:10:09 EST


Hi!

> > following patch fix the suspend/resume for tulip based
> > cards, so suspend on disk work now for me and tulip based
> > cardbus cards.
> >
> >
> > Signed-off-by: Karsten Keil <kkeil@xxxxxxx>
> >
> > static int tulip_suspend (struct pci_dev *pdev, pm_message_t state)
> > {
> > struct net_device *dev = pci_get_drvdata(pdev);
> > + int err;
> >
> > + pci_save_state(pdev);
> > if (dev && netif_running (dev) && netif_device_present (dev)) {
> > netif_device_detach (dev);
> > tulip_down (dev);
> > /* pci_power_off(pdev, -1); */
> > }
> > + if ((err = pci_set_power_state(pdev, PCI_D3hot)))
> > + printk(KERN_ERR "%s: pci_set_power_state D3hot return %d\n", dev->name, err);
> > return 0;
> > }
>
> It should probably test for message state, it's not worth doing
> pci_set_power_state(D3) if PMSG_FREEZE is passed... (just slows down
> suspend to disk)

How long does powering down netcard take? I am not sure speedup is worth added complexity.

Pavel
--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/