@@ -1021,6 +1021,8 @@ impl<T: DeviceBacking> GdmaDriver<T> {
10211021 // No data is supplied for VF reconfiguration events.
10221022 tracing:: info!( "HWC VF reconfiguration event" ) ;
10231023 self . vf_reconfiguration_pending = true ;
1024+ // HWC will no longer respond after this event.
1025+ self . hwc_failure = true ;
10241026 }
10251027 ty => tracing:: error!( ty, "unknown eq event" ) ,
10261028 }
@@ -1137,8 +1139,16 @@ impl<T: DeviceBacking> GdmaDriver<T> {
11371139 _ => "response received with delay" ,
11381140 }
11391141 ) ;
1140- self . report_hwc_timeout ( wait_failed, interrupt_loss, eqe_wait_result. elapsed as u32 )
1142+ // Don't report the timeout once VF reconfiguration is pending,
1143+ // since the SoC will not respond.
1144+ if !self . vf_reconfiguration_pending {
1145+ self . report_hwc_timeout (
1146+ wait_failed,
1147+ interrupt_loss,
1148+ eqe_wait_result. elapsed as u32 ,
1149+ )
11411150 . await ;
1151+ }
11421152 if !wait_failed && eqe_wait_result. elapsed > self . hwc_warning_time_in_ms as u128 {
11431153 // Increase warning threshold after each delay warning occurrence.
11441154 self . hwc_warning_time_in_ms += HWC_WARNING_INCREASE_IN_MS ;
@@ -1162,7 +1172,11 @@ impl<T: DeviceBacking> GdmaDriver<T> {
11621172 ) ) ;
11631173 }
11641174 }
1165- self . hwc_failure = false ;
1175+ // If the wait successfully found an EQE, clear hwc_failure caused by prior timeout.
1176+ // Don't clear hwc_failure during VF reconfiguration (EQE 135), the device is gone.
1177+ if !self . vf_reconfiguration_pending {
1178+ self . hwc_failure = false ;
1179+ }
11661180 Ok ( ( ) )
11671181 }
11681182
@@ -1478,4 +1492,9 @@ impl<T: DeviceBacking> GdmaDriver<T> {
14781492 )
14791493 . await
14801494 }
1495+
1496+ /// Returns true if the HWC has failed and no further requests will succeed.
1497+ pub ( crate ) fn hwc_failure ( & self ) -> bool {
1498+ self . hwc_failure
1499+ }
14811500}
0 commit comments