Skip to content

uefi: Fix io-align == 0 edgecase handling for ata & nvme #1698

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
Jun 10, 2025

Conversation

seijikun
Copy link
Contributor

@seijikun seijikun commented Jun 10, 2025

Accidentally implemented it only for scsi.
And of course ... there are mainboards out there that hit this... and for some reason, they turned out to be in my vicinity (╯°□°)╯ ┻━┻

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

@seijikun
Copy link
Contributor Author

@phip1611 If at all possible, I would really appreciate a quick merge of this one.

@@ -42,7 +42,9 @@ impl AtaPassThru {
/// The [`AtaPassThruMode`] structure containing configuration details of the protocol.
#[must_use]
pub fn mode(&self) -> AtaPassThruMode {
unsafe { (*self.0.mode).clone() }
let mut mode = unsafe { (*self.0.mode).clone() };
mode.io_align = mode.io_align.max(1); // 0 and 1 is the same, says UEFI spec
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phip1611 phip1611 added this pull request to the merge queue Jun 10, 2025
Merged via the queue into rust-osdev:main with commit 04cbd06 Jun 10, 2025
16 checks passed
@seijikun
Copy link
Contributor Author

Thanks!

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