Skip to content

Fixes for READ_MULTIPLE and WRITE_MULTIPLE commands #115

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

Merged
merged 1 commit into from
Aug 25, 2024

Conversation

mihaip
Copy link
Contributor

@mihaip mihaip commented Aug 25, 2024

We may be transferring less data than can fit in a chunk, so we need to ensure that xfer_cnt is clamped to 0 when transferring the last chunk (otherwise it remains negative, and has_data() will return true).

It's also possible that the transfer size is bigger than a chunk but not an even multiple of the chunk size, so we need to ensure that we don't try to transfer a whole chunk in the last iteration.

More correctly initialize the device identification struct, to report the maximum (word 47) and current (word 59) number of blocks that can be transferred with READ_MULTIPLE and WRITE_MULTIPLE commands.

Fix post_xfer_action to write the actual chunk size that was written, as opposed to an entire chunk (which may be larger).

@mihaip
Copy link
Contributor Author

mihaip commented Aug 25, 2024

(necessary but not sufficient for getting 9.2 to boot again on the Beige G3, see Discord discussion)

We may be transferring less data than can fit in a chunk, so we need
to ensure that xfer_cnt is clamped to 0 when transferring the last
chunk (otherwise it remains negative, and has_data() will return true).

It's also possible that the transfer size is bigger than a chunk but not
an even multiple of the chunk size, so we need to ensure that we don't
try to transfer a whole chunk in the last iteration.

More correctly initialize the device identification struct, to report
the maximum (word 47) and current (word 59) number of blocks that can be
transferred with READ_MULTIPLE and WRITE_MULTIPLE commands.

Fix post_xfer_action to write the actual data size that was written,
as opposed to an entire chunk (which may be larger).
@mihaip mihaip force-pushed the upstream-multiple branch from 7e9ab83 to 52f4d84 Compare August 25, 2024 05:51
@mihaip
Copy link
Contributor Author

mihaip commented Aug 25, 2024

Did another round of fixes, 9.2 now boots.

@dingusdev dingusdev merged commit 8d9bc66 into dingusdev:master Aug 25, 2024
5 checks passed
@mihaip mihaip deleted the upstream-multiple branch August 26, 2024 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants