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, May 6, 5:40 PM
Unknown Object (File)
Mon, May 6, 5:40 PM
Unknown Object (File)
Mon, May 6, 5:33 PM
Unknown Object (File)
Mon, May 6, 5:21 PM
Unknown Object (File)
Mon, May 6, 5:20 PM
Unknown Object (File)
Mon, Apr 29, 10:57 AM
Unknown Object (File)
Mon, Apr 22, 2:37 AM
Unknown Object (File)
Dec 28 2023, 8:36 AM
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.