From 4386cfb6490025c4d0f464e31cf4a8d90f065a1b Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 16 Aug 2025 18:22:11 -0400 Subject: kernel: ahci: Register drives with disk framework Signed-off-by: Ian Moffett --- sys/dev/ic/ahci.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sys') diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c index cd27f6a..d994ef1 100644 --- a/sys/dev/ic/ahci.c +++ b/sys/dev/ic/ahci.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -834,6 +835,12 @@ ahci_register(struct hba_device *dp, struct ahci_hba *hba) return error; } + snprintf(devname, sizeof(devname), "SATA drive %d", dp->dev); + error = disk_add(devname, dp->dev, &ahci_bdevsw, 0); + if (error < 0) { + pr_error("failed to add disk \"%s\"\n", devname); + return 1; + } return 0; } -- cgit v1.2.3