Repository navigation
SBP-2: align reconnect and logout with Apple - #228
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On top of #227 (needs it). Fixes the places where
LoginSessiondiffered from the references. With the state machine each fix is a few rows in the table. One commit each:suspendedNotify(management timeout + 1 s) and restarts it on every further reset (IOFireWireSBP2Login.cpp:2067-2077,2202-2235). If the login hasn't reconnected when it expires, it's lost (reconnectTimeout,:2395-2413). We started the timer only when the reconnect write was ACKed, and waited for rediscovery without a limit. The window is now a second timer beside the management one. If it closes before rediscovery, the session reports lost and rediscovery logs in afresh. On the LS-9000 that's a ~3 s window against the 650 ms rediscovery measured in SBP-2: re-login/reconnect after rediscovery, not on a 100 ms timer #216.sbp_status0xFF as transient and resends after 100 ms, inside the window (:2498-2503,:589). We fell back to a fresh login. Other rejections still fall back. The LS-9000's rejection after a power-cycle issbpStatus=4, so it's unchanged.suspendedNotifydoes nothing in LoggingOut (:2088-2092). We dropped to Idle silently. Now the old-generation logout write fails, or the logout timeout fires, and either one reports the logout.Kept as is, documented: logout while suspended follows Linux (
sbp2_removelogs out at once,sbp2.c:1221-1243). Apple'sfLogoutPendingpath never actually sends one: in Reconnect it only sets the flag again, and the timeout callsexecuteLogoutwith the flag still set, which returns busy (:2409-2410,:2634).Not tested on hardware yet. Plan for the LS-9000:
An ID-0 reconnect on the H4D is still open.