Could you apply it, please?
Andrey
----- Forwarded message from Jens Axboe <axboe@suse.de> -----
Date: Mon, 12 Nov 2001 13:24:53 +0100
From: Jens Axboe <axboe@suse.de>
To: saw@saw.sw.com.sg
Subject: eepro100 pm fix
Message-ID: <20011112132453.B786@suse.de>
Hi Andrey,
This patch posted by Andrew Morton makes the eepro100 actually survive a
apm suspend and resume without totally croaking (a problem I reported
probably a year or so ago :-). Any chance you could include it?
-- Jens Axboe
--- /opt/kernel/linux-2.4.15-pre3/drivers/net/eepro100.c Mon Nov 12 13:21:27 2001 +++ linux/drivers/net/eepro100.c Mon Nov 12 13:20:47 2001 @@ -499,6 +499,9 @@ unsigned short phy[2]; /* PHY media interfaces available. */ unsigned short advertising; /* Current PHY advertised caps. */ unsigned short partner; /* Link partner caps. */ +#ifdef CONFIG_PM + u32 pm_state[16]; +#endif }; /* The parameters for a CmdConfigure operation. @@ -2193,8 +2196,11 @@ static int eepro100_suspend(struct pci_dev *pdev, u32 state) { struct net_device *dev = pci_get_drvdata (pdev); + struct speedo_private *sp = (struct speedo_private *)dev->priv; long ioaddr = dev->base_addr; + pci_save_state(pdev, sp->pm_state); + if (!netif_running(dev)) return 0; @@ -2210,6 +2216,8 @@ struct net_device *dev = pci_get_drvdata (pdev); struct speedo_private *sp = (struct speedo_private *)dev->priv; long ioaddr = dev->base_addr; + + pci_restore_state(pdev, sp->pm_state); if (!netif_running(dev)) return 0;
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/