X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/8efc0cf32160c68772a2ce1887e6a397852d3d96..6f6da1abb22dff69dbb710bd2fd9d95f083f2b43:/lunaix-os/hal/ahci/ahci.c diff --git a/lunaix-os/hal/ahci/ahci.c b/lunaix-os/hal/ahci/ahci.c index 2b1176e..220038a 100644 --- a/lunaix-os/hal/ahci/ahci.c +++ b/lunaix-os/hal/ahci/ahci.c @@ -31,6 +31,7 @@ #define HBA_CLB_SIZE 1024 #define HBA_MY_IE (HBA_PxINTR_DHR | HBA_PxINTR_TFE | HBA_PxINTR_OF) +#define AHCI_DEVCLASS DEVCLASS(DEVIF_PCI, DEVFN_STORAGE, DEV_SATA, 0) // #define DO_HBA_FULL_RESET @@ -43,6 +44,8 @@ static char sata_ifs[][20] = { "Not detected", "SATA II (3.0Gbps)", "SATA III (6.0Gbps)" }; +static struct devclass ahci_class = AHCI_DEVCLASS; + extern void ahci_fsexport(struct block_dev* bdev, void* fs_node); @@ -209,6 +212,7 @@ ahci_register_device(struct hba_device* hbadev) bdev->end_lba = hbadev->max_lba; bdev->blk_size = hbadev->block_size; + bdev->class = &ahci_class; block_mount(bdev, ahci_fsexport); }