Remove special initialization for ICH8M, rely on BIOS to properly initialize the controller.
Details
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.
This changes does what it says, but no clue why we need it.
sys/dev/ahci/ahci_pci.c | ||
---|---|---|
361 | why? |
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. |