Page MenuHomeFreeBSD

Remove special initialization for ICH8M
ClosedPublic

Authored by delphij on Nov 22 2018, 7:33 PM.
Tags
None
Referenced Files
F103598705: D18300.diff
Tue, Nov 26, 11:32 PM
Unknown Object (File)
Wed, Nov 20, 7:38 AM
Unknown Object (File)
Wed, Nov 20, 3:53 AM
Unknown Object (File)
Wed, Nov 20, 3:34 AM
Unknown Object (File)
Tue, Nov 19, 8:26 PM
Unknown Object (File)
Tue, Nov 19, 1:25 PM
Unknown Object (File)
Sep 28 2024, 8:51 PM
Unknown Object (File)
Sep 21 2024, 8:25 AM
Subscribers

Details

Summary

Remove special initialization for ICH8M, rely on BIOS to properly initialize the controller.

Test Plan

test on Intel based controllers.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 21469
Build 20787: arc lint + arc unit

Event Timeline

I generally believe that we should let BIOS do its job. The chipset specification explicitly tells that OS doesn't need to know about this register. I can't recall why that code exist there and what was the problem, but since it touches only ancient ICH8M chipset, unless there is some other newer cases to have it, I'd remove it completely instead.

I am not sure there is a real reason to move this code after reset, since reset should not affect it, otherwise none of generic AHCI drivers could reset the controller.

Remove ICH8M specific initialization.

delphij retitled this revision from Force all ports active after AHCI initialization for Intel controllers. to Remove special initialization for ICH8M.Dec 10 2018, 7:22 AM
delphij edited the summary of this revision. (Show Details)

This changes does what it says, but no clue why we need it.

sys/dev/ahci/ahci_pci.c
361

why?

This revision is now accepted and ready to land.Dec 10 2018, 6:56 PM
delphij added inline comments.
sys/dev/ahci/ahci_pci.c
361

Because the initialization doesn't seem right. Based on the datasheet, what it does was:

If the controller was ICH8M, and if only port 2 (0x04) was enabled among all but port 1 (~0xfe), disable all port and enable port 1.

That doesn't really make sense to me, and was not found in anywhere else other than FreeBSD. (Everyone does something similar to ahci_ctrl_reset before poking enabled bits, by the way).

The alternative (previous revision) that I have proposed was to enable all ports regardless of their present state, which was done in some other operating systems. However, after talking with mav@, I was convinced that since we are not doing similar thing for so many years now and nobody complained, it's likely that an extra initialization like that was actually redundant.

This revision was automatically updated to reflect the committed changes.
delphij marked an inline comment as done.