Page MenuHomeFreeBSD

nvme_ahci: Mark AHCI devices as such in the controller
ClosedPublic

Authored by imp on Dec 6 2021, 6:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 12 2024, 11:30 AM
Unknown Object (File)
Jan 12 2024, 8:05 AM
Unknown Object (File)
Dec 23 2023, 8:12 AM
Unknown Object (File)
Dec 17 2023, 3:45 PM
Unknown Object (File)
Nov 18 2023, 7:19 PM
Unknown Object (File)
Nov 18 2023, 7:19 PM
Unknown Object (File)
Nov 18 2023, 7:19 PM
Unknown Object (File)
Nov 18 2023, 7:19 PM
Subscribers

Details

Summary

Add a quirk to flag AHCI attachment to the controller. This is for any
of the strategies for attaching nvme devices as children of the AHCI
device for Intel's RAID devices. This also has a side effect of cleaning
up resource allocation from failed nvme_attach calls now.

Sponsored by: Netflix

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43191
Build 40079: arc lint + arc unit

Event Timeline

mav requested changes to this revision.Dec 6 2021, 2:56 PM
mav added inline comments.
sys/dev/nvme/nvme_ahci.c
115

The logic is broken here.

This revision now requires changes to proceed.Dec 6 2021, 2:56 PM
sys/dev/nvme/nvme_ahci.c
115

Doh! I hate those last second changes.... Fixed.

sys/dev/nvme/nvme_ahci.c
115

Are you sure this part is really needed? I see ahci_attach() calls nvme_ctrlr_destruct() on failure, freeing those resources already.

mav is right: the code was right before since nvme_attach cleans this
up in failure case.

sys/dev/nvme/nvme_ahci.c
115

I thought I was sure.... But I see I had overlooked it... so I've updated..

Though there is one hole: if config_interhook_establish fails, then we don't deconstruct things and generally just trail off in a way that's unsatisfying... I'll look at fixing that (though I'm not sure what can be done)

This revision is now accepted and ready to land.Dec 6 2021, 5:13 PM
sys/dev/nvme/nvme_ahci.c
115

Hmmm, looking at config_intrhook_establish, it can only fail if it was called twice! I'm thinking maybe that should be converted to a panic....

sys/dev/nvme/nvme_ahci.c
115

Wasn't that a protection against simultaneous detach?