Page MenuHomeFreeBSD

add a sysctl to the AHCI driver to allow disabling the PHY
ClosedPublic

Authored by chs on Jun 27 2018, 9:43 PM.

Details

Summary

As part of my work on fixing kernel crashes caused by disk I/O errors, it is useful to be able to trigger various kinds of errors. This patch allows causing an AHCI-attached disk to disappear, by having the driver keep the PHY disabled when the driver would otherwise enable the PHY. It also allows making the disk reappear by having the driver go back to setting the PHY enable/disable state as it normal would and simulating the hardware event that causes a bus rescan.

Test Plan

I've verified that toggling this new sysctl makes the corresponding disk disappear or reappear, and that CAM reacts to these events as expected.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

This looks good to my eye. I'll rebase and commit after a quick test unless I hear otherwise....

This revision was not accepted when it landed; it landed in state Needs Review.Nov 3 2018, 12:38 AM
This revision was automatically updated to reflect the committed changes.