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

AHCIController: Fix off-by-one mistake #7144

Merged
merged 1 commit into from
May 15, 2021

Conversation

ElectrodeYT
Copy link
Contributor

@ElectrodeYT ElectrodeYT commented May 15, 2021

Fixes off-by-one caused by reading the register directly without adding a 1 to it, because AHCI reports 1 less port than the actual number of ports supported.

Fixes off-by-one caused by reading the register directly
without adding a 1 to it, because AHCI reports 1 less port than
the actual number of ports supported.
@IdanHo
Copy link
Member

IdanHo commented May 15, 2021

mind making the commit message a bit more descriptive?

@ElectrodeYT
Copy link
Contributor Author

Yeah, just added the description to the commit

@supercomputer7
Copy link
Member

Great finding! I forgot that the register that indicates how much ports we have is actually the count minus 1....

@awesomekling awesomekling changed the title AHCIController: fix off-by-one AHCIController: Fix off-by-one mistake May 15, 2021
@awesomekling awesomekling merged commit 88a9978 into SerenityOS:master May 15, 2021
@ElectrodeYT ElectrodeYT deleted the ahci-off-by-one branch May 15, 2021 18:03
Hendiadyoin1 pushed a commit to Hendiadyoin1/serenity that referenced this pull request May 24, 2021
Fixes off-by-one caused by reading the register directly
without adding a 1 to it, because AHCI reports 1 less port than
the actual number of ports supported.
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.

None yet

4 participants