From 08cbd009ac8c6931255f3590d7879b6a5f636db1 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sat, 29 Jun 2024 22:11:55 +0300 Subject: [PATCH] Kernel: PCI don't report multi function bit with header_type() --- kernel/include/kernel/PCI.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/include/kernel/PCI.h b/kernel/include/kernel/PCI.h index 131e49d9..940fd6fe 100644 --- a/kernel/include/kernel/PCI.h +++ b/kernel/include/kernel/PCI.h @@ -78,7 +78,8 @@ namespace Kernel::PCI uint8_t subclass() const { return m_subclass; } uint8_t prog_if() const { return m_prog_if; } - uint8_t header_type() const { return m_header_type; } + bool multi_function() const { return m_header_type & 0x80; } + uint8_t header_type() const { return m_header_type & 0x7F; } uint16_t vendor_id() const { return m_vendor_id; } uint16_t device_id() const { return m_device_id; }