@@ -6067,7 +6067,6 @@ void ConnectorImpl::flushTimeslotsToHardware()
60676067
60686068void ConnectorImpl::beforeDeleteStream (GroupImpl * group, bool forFlushMode)
60696069{
6070-
60716070 //
60726071 // During flush entry, if the link is not trained, retrain
60736072 // the link so that ACT can be ack'd by the sink.
@@ -6079,11 +6078,18 @@ void ConnectorImpl::beforeDeleteStream(GroupImpl * group, bool forFlushMode)
60796078 // head is not actively driving pixels and this needs to be handled
60806079 // differently .
60816080 //
6082- if (forFlushMode && linkUseMultistream ())
6081+ if (forFlushMode && linkUseMultistream ())
60836082 {
60846083 if (isLinkLost ())
60856084 {
6086- train (activeLinkConfig, false );
6085+ if (!this ->bDisable5019537Fix )
6086+ {
6087+ train (highestAssessedLC, false );
6088+ }
6089+ else
6090+ {
6091+ train (activeLinkConfig, false );
6092+ }
60876093 }
60886094 }
60896095
@@ -7307,20 +7313,39 @@ void ConnectorImpl::notifyShortPulse()
73077313 {
73087314 return ;
73097315 }
7310- // save the previous highest assessed LC
7316+
7317+ // Save the previous highest assessed LC
73117318 LinkConfiguration previousAssessedLC = highestAssessedLC;
7319+ // Save original active link configuration.
7320+ LinkConfiguration originalActiveLinkConfig = activeLinkConfig;
73127321
73137322 if (main->isConnectorUSBTypeC () &&
73147323 activeLinkConfig.bIs128b132bChannelCoding &&
73157324 activeLinkConfig.peakRate > dp2LinkRate_10_0Gbps)
73167325 {
73177326 if (activeLinkConfig.isValid () && enableFlush ())
73187327 {
7319- train (activeLinkConfig, true );
7328+ if (!this ->bDisable5019537Fix )
7329+ {
7330+ train (originalActiveLinkConfig, true );
7331+ }
7332+ else
7333+ {
7334+ train (activeLinkConfig, true );
7335+ }
73207336 disableFlush ();
73217337 }
7322- main->invalidateLinkRatesInFallbackTable (activeLinkConfig.peakRate );
7323- hal->overrideCableIdCap (activeLinkConfig.peakRate , false );
7338+
7339+ if (!this ->bDisable5019537Fix )
7340+ {
7341+ main->invalidateLinkRatesInFallbackTable (originalActiveLinkConfig.peakRate );
7342+ hal->overrideCableIdCap (originalActiveLinkConfig.peakRate , false );
7343+ }
7344+ else
7345+ {
7346+ main->invalidateLinkRatesInFallbackTable (activeLinkConfig.peakRate );
7347+ hal->overrideCableIdCap (activeLinkConfig.peakRate , false );
7348+ }
73247349
73257350 highestAssessedLC = getMaxLinkConfig ();
73267351
@@ -7334,8 +7359,16 @@ void ConnectorImpl::notifyShortPulse()
73347359
73357360 if (activeLinkConfig.isValid () && enableFlush ())
73367361 {
7337- LinkConfiguration originalActiveLinkConfig = activeLinkConfig;
7338- if (!train (activeLinkConfig, false ))
7362+ bool bTrainSuccess = false ;
7363+ if (!this ->bDisable5019537Fix )
7364+ {
7365+ bTrainSuccess = train (originalActiveLinkConfig, false );
7366+ }
7367+ else
7368+ {
7369+ bTrainSuccess = train (activeLinkConfig, false );
7370+ }
7371+ if (!bTrainSuccess)
73397372 {
73407373 //
73417374 // If original link config could not be restored force
0 commit comments