-
Notifications
You must be signed in to change notification settings - Fork 803
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[opentitantool] Avoid repeated opening/closing
Introduce means for users of opentitanlib to declare that for a period, no other users will be simultaneously accessing the same debugger device, allowing the driver to keep USB handles open across multiple operations. The primary motivation for this is an observation that the repeated opening and closing of the `/dev/ttyUSBn` HyperDebug console in conjuction with other activity on the USB bus may trigger what could be a bug in the Linux USB driver stack. Even absent concerns for such a bug, this change reduces the time taken by `transport init` from 0.4s to 0.1s for a set of Google configuration files, which could become significant, when running many small test cases in a row. In this first iteration, `opentitansession` is made to claim exclusive use of the USB backend all the time, and `opentitantool` is meade to claim exclusive use any time, except when a sub-command explicitly declares that it does not want exclusive use. Only the `console` command is declared in that way, as that is the only one that stays running for an unbounded period, and is often left running while opentitantool is separately invoked to manipulate GPIO or other things. Signed-off-by: Jes B. Klinke <[email protected]> Change-Id: I1c3625d6efa87a531ae20f5f1cdb576e1096bde9 (cherry picked from commit 3e4b973)
- Loading branch information
Showing
8 changed files
with
190 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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