diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-20 19:40:30 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-20 19:40:30 -0500 |
| commit | c739255b48b3a5b2e184ca1a637f9f1f95c978ff (patch) | |
| tree | 3db42241d514cf0e85b3ae6a3a1b17fa7ccf0f3b /dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc | |
| parent | 72dc7188a81052bfeb649eecb420e6b52e2c0c4b (diff) | |
| parent | c464e5800961c809c73d4180f8a66885b53c63d7 (diff) | |
Merge pull request #78 from nekernel-org/devv0.0.6
meta: Codebase improvements on NeKernel.
Diffstat (limited to 'dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc')
| -rw-r--r-- | dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc b/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc index 821d80bb..14b40b98 100644 --- a/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc +++ b/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc @@ -1,8 +1,8 @@ -/* ------------------------------------------- +/* ======================================== Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. -------------------------------------------- */ +======================================== */ /** * @file AHCI+Generic.cc @@ -294,7 +294,8 @@ STATIC Void drv_std_input_output_ahci(UInt64 lba, UInt8* buffer, SizeT sector_sz goto ahci_io_end; } else { kout << "ahci: Disk still busy after command completion!\r"; - while (kSATAHba->Ports[kSATAIndex].Tfd & (kSATASRBsy | kSATASRDrq)); + while (kSATAHba->Ports[kSATAIndex].Tfd & (kSATASRBsy | kSATASRDrq)) + ; } ahci_io_end: @@ -307,15 +308,13 @@ STATIC Void drv_std_input_output_ahci(UInt64 lba, UInt8* buffer, SizeT sector_sz @brief Gets the number of sectors inside the drive. @return Sector size in bytes. */ -STATIC ATTRIBUTE(unused) -SizeT drv_get_sector_count_ahci() { +STATIC ATTRIBUTE(unused) SizeT drv_get_sector_count_ahci() { return kSATASectorCount; } /// @brief Get the drive size. /// @return Disk size in bytes. -STATIC ATTRIBUTE(unused) -SizeT drv_get_size_ahci() { +STATIC ATTRIBUTE(unused) SizeT drv_get_size_ahci() { return drv_std_get_sector_count() * kAHCISectorSize; } |
