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

ahc(4): Default to memory mapped IO #1219

Merged
merged 1 commit into from
May 10, 2024
Merged

Conversation

hpvb
Copy link
Contributor

@hpvb hpvb commented May 5, 2024

When this driver was written it made sense to make this default to off, but these days almost all BIOSses will do the right thing. Furthermore non-mmio communication only works on Intel architectures.

So lets default to allowing mmio, but not change the semantics of the AHC_ALLOW_MEMIO flag to not break existing installs. Also document the already existing hint.ahc.<unit>.allow_memio.

When this driver was written it made sense to make this default to off,
but these days almost all BIOSses will do the right thing. Furthermore
non-mmio communication only works on Intel architectures.

So lets default to allowing mmio, but not change the semantics of the
AHC_ALLOW_MEMIO flag to not break existing installs. Also document the
already existing hint.ahc.<unit>.allow_memio.

Signed-off-by: HP van Braam <hp@tmm.cx>
Reviewed by: imp (small style tweak)
Pull Request: freebsd#1219
@@ -144,20 +144,23 @@ ahc_pci_map_registers(struct ahc_softc *ahc)
regs_type = 0;
regs_id = 0;

// Default to memio
allow_memio = 1;

Copy link
Member

Choose a reason for hiding this comment

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

This is better off as an initializer, imho. Also , we try not to do C++ comments. Tweaked before the push.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah,.I didn't realize that initializers were allowed. I'll keep that in mind for the future, also the comment style, thanks!

@freebsd-git freebsd-git merged commit c733dc7 into freebsd:main May 10, 2024
8 of 9 checks passed
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Aug 26, 2024
When this driver was written it made sense to make this default to off,
but these days almost all BIOSses will do the right thing. Furthermore
non-mmio communication only works on Intel architectures.

So lets default to allowing mmio, but not change the semantics of the
AHC_ALLOW_MEMIO flag to not break existing installs. Also document the
already existing hint.ahc.<unit>.allow_memio.

Signed-off-by: HP van Braam <hp@tmm.cx>
Reviewed by: imp (small style tweak)
Pull Request: freebsd/freebsd-src#1219
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.

3 participants