support drivers that can't use reset directly. #368
Merged
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.
This should allow a driver to interact with a controller, via the
host
, before any command, including RESET is issued.See the example with the Realtek driver.
Note that if a driver needs to send a command and receive a response before RESET is performed, it must set
host.ready = True
to allow the inbound packet processing to accept the packet even if no RESET has been done (by default, the host ignores packets from the controller that are received before a RESET).Also included is a generic way to add HCI metadata to an HCI transport source. Previously, only certain transport sources would set metdata (USB would set
vendor_id
andproduct_id
, which the Realtek driver uses to determine if it should tryto load a FW image). Now, a driver can be "forced" for a specific HCI source, when no relevant metadata is available (for
example, when the controller is only visible via a transport that does not set metadata, like a serial port or TCP socket).
Any number of metadata
key=value
pairs can be added to a transport name, in square brackets, after the transport type.Example:
usb:[driver=rtk]0
would "inject" a "driver" metadata entry for the usb transport, which the Realtek driver will see as a request that this driver be activated, even if thevendor_id
andproduct_id
are not present, or don't match the internal allow-list.