View | Details | Raw Unified | Return to bug 115814
Collapse All | Expand All

(-)linux/drivers/net~/r8169.c (-2 / +22 lines)
Lines 1624-1629 static int rtl8169_suspend(struct pci_de Link Here
1624
		return 0;
1624
		return 0;
1625
	
1625
	
1626
	netif_device_detach(dev);
1626
	netif_device_detach(dev);
1627
	rtl8169_delete_timer(dev);
1627
	netif_stop_queue(dev);
1628
	netif_stop_queue(dev);
1628
	spin_lock_irqsave(&tp->lock, flags);
1629
	spin_lock_irqsave(&tp->lock, flags);
1629
1630
Lines 1635-1640 static int rtl8169_suspend(struct pci_de Link Here
1635
	tp->stats.rx_missed_errors += RTL_R32(RxMissed);
1636
	tp->stats.rx_missed_errors += RTL_R32(RxMissed);
1636
	RTL_W32(RxMissed, 0);
1637
	RTL_W32(RxMissed, 0);
1637
	spin_unlock_irqrestore(&tp->lock, flags);
1638
	spin_unlock_irqrestore(&tp->lock, flags);
1639
1640
	free_irq(dev->irq, dev);
1641
	pci_save_state(pdev);
1642
	pci_disable_device(pdev);
1643
	pci_set_power_state(pdev, pci_choose_state(pdev, state));
1638
	
1644
	
1639
	return 0;
1645
	return 0;
1640
}
1646
}
Lines 1642-1653 static int rtl8169_suspend(struct pci_de Link Here
1642
static int rtl8169_resume(struct pci_dev *pdev)
1648
static int rtl8169_resume(struct pci_dev *pdev)
1643
{
1649
{
1644
	struct net_device *dev = pci_get_drvdata(pdev);
1650
	struct net_device *dev = pci_get_drvdata(pdev);
1651
	int retval;
1652
1653
	if (!dev)
1654
		return -EINVAL;
1655
1656
	pci_set_power_state(pdev, PCI_D0);
1657
	pci_restore_state(pdev);
1658
	pci_enable_device(pdev);
1659
1660
	if ((retval = request_irq(dev->irq, rtl8169_interrupt, SA_SHIRQ, dev->name, dev))) {
1661
		printk (KERN_ERR "r8169: request_irq failed in resume error %d\n", retval);
1662
		return retval;
1663
	}
1664
1665
	netif_device_attach(dev);
1645
1666
1646
	if (!netif_running(dev))
1667
	if (!netif_running(dev))
1647
	    return 0;
1668
	    return 0;
1648
1669
1649
	netif_device_attach(dev);
1670
	rtl8169_open(dev);
1650
	rtl8169_hw_start(dev);
1651
1671
1652
	return 0;
1672
	return 0;
1653
}
1673
}

Return to bug 115814