From f652c5f36253cc39bea8b13166d21099a0e44e4e Mon Sep 17 00:00:00 2001 From: ramenu Date: Fri, 19 Apr 2024 23:37:14 -0400 Subject: [PATCH] refactor: remove some fields from pci_dev and add some constants --- drivers/nvme/nvme.inc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/nvme/nvme.inc b/drivers/nvme/nvme.inc index 1b96096..6f8af04 100644 --- a/drivers/nvme/nvme.inc +++ b/drivers/nvme/nvme.inc @@ -113,6 +113,9 @@ CC_CRIME = 1 shl 24 CC_DEFAULT_IOSQES = 6 shl 16 CC_DEFAULT_IOCQES = 4 shl 16 +MAX_NVM_PCIDEVS_BYTES = 16 +MAX_NVM_PCIDEVS = MAX_NVM_PCIDEVS_BYTES / 4 + struct NVME_REG_MAP CAP rq 1 ; Controller Capabilities VS rd 1 ; Version @@ -144,15 +147,10 @@ struct SQ_ENTRY cdw15 rd 1 ends -; Completion Queue Entry () - -struc nvme_dev { - .pci_bus dd ? - .pci_devfn dd ? - .bar0 dd ? - .serial db 20 - .model db 40 -} +struct pcidev + bus dd ? + devfn dd ? +ends struct NVME_IDENT_CONTROLLER