devices/r8169-2.6.36-ethercat.c
branchstable-1.5
changeset 2582 87e502828b3f
parent 2421 bc2d4bf9cbe5
equal deleted inserted replaced
2581:d94281cb835a 2582:87e502828b3f
  3237 	 */
  3237 	 */
  3238 	if (tp->mac_version == RTL_GIGA_MAC_VER_05)
  3238 	if (tp->mac_version == RTL_GIGA_MAC_VER_05)
  3239 		RTL_W16(CPlusCmd, RTL_R16(CPlusCmd) | RxVlan);
  3239 		RTL_W16(CPlusCmd, RTL_R16(CPlusCmd) | RxVlan);
  3240 
  3240 
  3241 	device_set_wakeup_enable(&pdev->dev, tp->features & RTL_FEATURE_WOL);
  3241 	device_set_wakeup_enable(&pdev->dev, tp->features & RTL_FEATURE_WOL);
  3242 	if (tp->ecdev && ecdev_open(tp->ecdev)) {
  3242 
  3243 		ecdev_withdraw(tp->ecdev);
  3243 	if (pci_dev_run_wake(pdev))
  3244 		goto err_out_msi_4;
  3244 		pm_runtime_put_noidle(&pdev->dev);
  3245 	}
  3245 
  3246 
  3246 	if (tp->ecdev) {
  3247 	if(!tp->ecdev) {
  3247 		rc = ecdev_open(tp->ecdev);
  3248 		if (pci_dev_run_wake(pdev))
  3248 		if (rc) {
  3249 			pm_runtime_put_noidle(&pdev->dev);
  3249 			ecdev_withdraw(tp->ecdev);
  3250 	}
  3250 			goto err_out_msi_4;
       
  3251 		}
       
  3252 	}
       
  3253 
  3251 out:
  3254 out:
  3252 	return rc;
  3255 	return rc;
  3253 
  3256 
  3254 err_out_msi_4:
  3257 err_out_msi_4:
  3255 	rtl_disable_msi(pdev, tp);
  3258 	rtl_disable_msi(pdev, tp);