Open cproc opened 10 months ago
Have the changes in #5101 positive impact on this issue?
Have the changes in #5101 positive impact on this issue?
No, the problem still exists. The problematic first port reset has now moved to Port::reinit()
.
This discussion in the user forum hints we should address this issue...
When I tried to run Sculpt on a PC with an ASUS Q170T main board, the AHCI driver did not report the connected SATA SSDs, but showed them as
off
in the log:The error symptom in the driver is that setting the
Cmd::Fre
bit to 0 does not cause theCmd::Fr
bit to change to 0 as well:https://github.com/genodelabs/genode/blob/c4679e7af644f2ff8d07b9b48bc2c79eb57a79cc/repos/os/src/drivers/ahci/ahci.h#L880-L885
The problem appears to be related to the port reset at the beginning of the
Port()
constructor:https://github.com/genodelabs/genode/blob/c4679e7af644f2ff8d07b9b48bc2c79eb57a79cc/repos/os/src/drivers/ahci/ahci.h#L549-L555
When I tried the
Cmd::Fre
bit change before thisreset()
call, theCmd::Fr
bit changed to 0 as expected.The AHCI specification mentions that "software should write all 1s to the PxSERR register to clear any bits that were set as part of the port reset.", which is done after the second port reset in the
init()
function, but not after the first port reset in thePort()
constructor:https://github.com/genodelabs/genode/blob/c4679e7af644f2ff8d07b9b48bc2c79eb57a79cc/repos/os/src/drivers/ahci/ahci.h#L856-L860
When I added a
clear_serr()
call in thePort()
constructor, theCmd::Fr
bit change was successful, but an IOMMU error message appeared duringclear_serr()
:This error message does not occur during the second
clear_serr()
call in theinit()
function and apparently got "fixed" by thesetup_memory()
call before the second port reset.Removing the first
reset()
call from thePort()
constructor appears to solve the problem without an IOMMU error, but I'm not sure if it is the correct fix.