devices/r8169-2.6.33-ethercat.c
branchstable-1.5
changeset 2421 bc2d4bf9cbe5
parent 2225 a2a2f1a0d07b
child 2582 87e502828b3f
equal deleted inserted replaced
2420:69056c46aa4d 2421:bc2d4bf9cbe5
  2707 	if (!(tp->phy_1000_ctrl_reg & ADVERTISE_1000FULL))
  2707 	if (!(tp->phy_1000_ctrl_reg & ADVERTISE_1000FULL))
  2708 		return;
  2708 		return;
  2709 
  2709 
  2710 	if (!tp->ecdev)
  2710 	if (!tp->ecdev)
  2711 		spin_lock_irq(&tp->lock);
  2711 		spin_lock_irq(&tp->lock);
  2712 	
  2712 
  2713 	if (tp->phy_reset_pending(ioaddr)) {
  2713 	if (tp->phy_reset_pending(ioaddr)) {
  2714 		/*
  2714 		/*
  2715 		 * A busy loop could burn quite a few cycles on nowadays CPU.
  2715 		 * A busy loop could burn quite a few cycles on nowadays CPU.
  2716 		 * Let's delay the execution of the timer for a few ticks.
  2716 		 * Let's delay the execution of the timer for a few ticks.
  2717 		 */
  2717 		 */
  3337 				dev->name, dev);
  3337 				dev->name, dev);
  3338 		if (retval < 0)
  3338 		if (retval < 0)
  3339 			goto err_release_ring_2;
  3339 			goto err_release_ring_2;
  3340 
  3340 
  3341 		napi_enable(&tp->napi);
  3341 		napi_enable(&tp->napi);
  3342  
       
  3343 	}
  3342 	}
  3344 
  3343 
  3345 	rtl_hw_start(dev);
  3344 	rtl_hw_start(dev);
  3346 
  3345 
  3347 	rtl8169_request_timer(dev);
  3346 	rtl8169_request_timer(dev);
  4941 static int rtl8169_suspend(struct device *device)
  4940 static int rtl8169_suspend(struct device *device)
  4942 {
  4941 {
  4943 	struct pci_dev *pdev = to_pci_dev(device);
  4942 	struct pci_dev *pdev = to_pci_dev(device);
  4944 	struct net_device *dev = pci_get_drvdata(pdev);
  4943 	struct net_device *dev = pci_get_drvdata(pdev);
  4945 	struct rtl8169_private *tp = netdev_priv(dev);
  4944 	struct rtl8169_private *tp = netdev_priv(dev);
  4946 	
  4945 
  4947 	if (tp->ecdev)
  4946 	if (tp->ecdev)
  4948  		return -EBUSY;
  4947  		return -EBUSY;
  4949 
  4948 
  4950 	rtl8169_net_suspend(dev);
  4949 	rtl8169_net_suspend(dev);
  4951 
  4950