Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fw_fcp: abort transaction at bus reset #99

Merged
merged 6 commits into from
Aug 11, 2023

Conversation

takaswie
Copy link
Member

In AV/C Digital interface Command Set General Specification, any transactions are going
to be aborted at bus reset.

The series is the support for the behaviour, including code refactoring.

Takashi Sakamoto (6):
  fw_fcp: code refactoring to check result of transaction
  fw_fcp: code refactoring for lifetime of handler and lock
  fw_fcp: maintain transaction in doubly-linked list
  fw_fcp: iterate list entries for transactions
  fw_fcp: use enumeration for state of transaction
  fw_fcp: abort transaction at bus reset

 src/fw_fcp.c            | 140 +++++++++++++++++++++++++++++++---------
 src/hinawa_enum_types.h |   2 +
 tests/hinawa-enum       |   1 +
 3 files changed, 113 insertions(+), 30 deletions(-)

For readability.

Signed-off-by: Takashi Sakamoto <[email protected]>
This is a preparation for future work.

Signed-off-by: Takashi Sakamoto <[email protected]>
This is a preparation to operate response of transactions over the list,
instead of the pointer in stack.

Signed-off-by: Takashi Sakamoto <[email protected]>
The pointer in stack is passed to the thread in which response is copied
to it, however the lifetime of stack is different from the lifetime of
thread. It can be caused that the pointer is accessed in the thread after
the stack is dropped.

This commit solves the issue by enumerating the list of transactions.

Signed-off-by: Takashi Sakamoto <[email protected]>
This commit adds an enumeration to express the state of transaction to
obsolete the check of first byte in response buffer for the state.

Signed-off-by: Takashi Sakamoto <[email protected]>
In AV/C Digital interface Command Set General Specification, at bus reset,
any transactions are going to be aborted.

This commit is an optimization to the behaviour.

Signed-off-by: Takashi Sakamoto <[email protected]>
@takaswie takaswie requested a review from a team August 10, 2023 01:27
@takaswie takaswie self-assigned this Aug 10, 2023
@takaswie takaswie merged commit 71d5953 into master Aug 11, 2023
2 of 4 checks passed
@takaswie takaswie deleted the topic/fcp-abort-at-bus-reset branch August 11, 2023 00:24
@takaswie
Copy link
Member Author

Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant