- Timestamp:
- Dec 8, 2016 11:27:49 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r64740 r64807 66 66 */ 67 67 #define E1K_LSC_ON_SLU 68 /** @def E1K_INIT_LINKUP_DELAY 69 * E1K_INIT_LINKUP_DELAY prevents the link going up while the driver is still70 * in init (see @bugref{8624}). 71 */ 72 //#define E1K_INIT_LINKUP_DELAY(500 * 1000)68 /** @def E1K_INIT_LINKUP_DELAY_US 69 * E1K_INIT_LINKUP_DELAY_US prevents the link going up while the driver is still 70 * in init (see @bugref{8624}). The units are microseconds. 71 */ 72 #define E1K_INIT_LINKUP_DELAY_US (500 * 1000) 73 73 /** @def E1K_IMS_INT_DELAY_NS 74 74 * E1K_IMS_INT_DELAY_NS prevents interrupt storms in Windows guests on enabling … … 2678 2678 && !(STATUS & STATUS_LU)) 2679 2679 { 2680 #ifdef E1K_INIT_LINKUP_DELAY2681 2680 /* 2682 * The driver indicates that we should bring up the link. Our default 5-second delay is too long, 2683 * as Linux guests detect Tx hang after 2 seconds. Let's use 500 ms delay instead. */ 2684 e1kArmTimer(pThis, pThis->CTX_SUFF(pLUTimer), E1K_INIT_LINKUP_DELAY); 2685 #else /* !E1K_INIT_LINKUP_DELAY */ 2686 /* Bring up the link immediately, no need for an interrupt though. */ 2681 * Arch Linux guests urge us to bring up the link immediately or risk 2682 * hitting Tx unit hang detection by the driver. The interrupt must 2683 * be delayed though, to avoid interrupt storms in Windows guests. 2684 * See @bugref{8624} for details. */ 2687 2685 STATUS |= STATUS_LU; 2688 2686 Phy::setLinkStatus(&pThis->phy, true); 2687 #ifdef E1K_INIT_LINKUP_DELAY 2688 /* We need to deliver a link-up interrupt for macOS guests. */ 2689 e1kArmTimer(pThis, pThis->CTX_SUFF(pLUTimer), E1K_INIT_LINKUP_DELAY_US); 2690 #else /* !E1K_INIT_LINKUP_DELAY */ 2691 /* 2692 * Raising an interrupt immediately may cause an interrupt storm in 2693 * Windows guests when the guest's driver enables interrupts from 2694 * e1000 during init. Usually the driver will have interrupts 2695 * disabled when it sets CTRL_SLU, so we won't actually raise an 2696 * interrupt here, but we will do it as soon as the guest enables 2697 * interrupts via IMS. See @bugref{8624} for details. 2698 */ 2699 e1kRaiseInterrupt(pThis, VERR_SEM_BUSY, ICR_LSC); 2689 2700 #endif /* !E1K_INIT_LINKUP_DELAY */ 2690 2701 }
Note:
See TracChangeset
for help on using the changeset viewer.