Page MenuHomeFreeBSD

aac, aacraid: use DEVICE_SHUTDOWN() method
AbandonedPublic

Authored by mhorne on Oct 23 2023, 8:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 21, 2:02 AM
Unknown Object (File)
Sep 30 2024, 3:23 PM
Unknown Object (File)
Sep 27 2024, 3:15 PM
Unknown Object (File)
Sep 27 2024, 4:51 AM
Unknown Object (File)
Sep 22 2024, 5:15 PM
Unknown Object (File)
Sep 16 2024, 8:47 PM
Unknown Object (File)
Sep 6 2024, 1:10 AM
Unknown Object (File)
Sep 4 2024, 11:54 PM
Subscribers

Details

Reviewers
markj
jhb
Summary

Rather than hooking onto the shutdown_final event handler, use the
standard device method. Despite what the comment claims, this will
execute at the correct time. module_shutdown() is hooked up to execute
at shutdown_final, SHUTDOWN_PRI_DEFAULT. This will invoke device_shutdown()
on the root bus, and thus all devices.

This does change behaviour slightly, as the shutdown method will now be
skipped whenever RB_NOSYNC is set for the reboot (most typically after a
panic). This is most likely desirable.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 54139
Build 51029: arc lint + arc unit

Event Timeline

I'm not too sure about this one... Even when we panic, we want to shut down the aac controller so it's in a good state when we reboot. This is true for both drivers. Suggest adding Scott Long to the list of reviewers since he wrote the driver and knows this hardware.

This does change behaviour slightly, as the shutdown method will now be skipped whenever RB_NOSYNC is set for the reboot (most typically after a panic). This is most likely desirable.

I'm not sure I agree. aac(raid)_shutdown() does nothing but synchronously send a command to controller firmware, it's quite possible that we want that to happen even if RB_NOSYNC is set. I'm quite sure based on personal experience with aac(4) that dumping to the RAID controller has worked fine historically, so I'm somewhat uncomfortable with this change unless it's been tested.

Thanks, both of you. I am not at all attached to the change, and will abandon it in the interest of caution.