Re: swsuspend not working

From: Éric Brunet
Date: Fri Aug 06 2004 - 18:58:47 EST


On Fri, Aug 06, 2004 at 09:06:49PM +0200, Pavel Machek wrote:
> > Do you think it could get in ?
>
> Yes, the patch looks good to me, submit it through ne2k-pci
> maintainer...
>
Thank you ! The maintainer (Paul Gortmaker) is already in the CC. He
didn't answer but hey, it is August and people are going on holyday. I
will resend the patch in September.

Éric Brunet
> Pavel
>
> > --- ne2k-pci.c.orig 2004-07-20 22:15:30.000000000 +0200
> > +++ ne2k-pci.c 2004-07-31 19:48:38.000000000 +0200
> > @@ -653,12 +653,43 @@
> > pci_set_drvdata(pdev, NULL);
> > }
> >
> > +#ifdef CONFIG_PM
> > +static int ne2k_pci_suspend (struct pci_dev *pdev, u32 state)
> > +{
> > + struct net_device *dev = pci_get_drvdata (pdev);
> > +
> > + netif_device_detach(dev);
> > + ne2k_pci_close(dev);
> > + ne2k_pci_reset_8390(dev);
> > + pci_set_power_state (pdev, state);
> > +
> > + return 0;
> > +}
> > +static int ne2k_pci_resume (struct pci_dev *pdev)
> > +{
> > + struct net_device *dev = pci_get_drvdata (pdev);
> > +
> > + pci_set_power_state(pdev, 0);
> > + ne2k_pci_reset_8390(dev);
> > + ne2k_pci_open(dev);
> > + netif_device_attach(dev);
> > +
> > + return 0;
> > +}
> > +
> > +#endif /* CONFIG_PM */
> > +
> >
> > static struct pci_driver ne2k_driver = {
> > .name = DRV_NAME,
> > .probe = ne2k_pci_init_one,
> > .remove = __devexit_p(ne2k_pci_remove_one),
> > .id_table = ne2k_pci_tbl,
> > +#ifdef CONFIG_PM
> > + .suspend = ne2k_pci_suspend,
> > + .resume = ne2k_pci_resume,
> > +#endif /* CONFIG_PM */
> > +
> > };
> >
> >
>
> --
> People were complaining that M$ turns users into beta-testers...
> ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
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/