summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ic/ahci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c
index 9482c77..fc87b71 100644
--- a/sys/dev/ic/ahci.c
+++ b/sys/dev/ic/ahci.c
@@ -46,6 +46,7 @@
#define pr_trace(fmt, ...) kprintf("ahci: " fmt, ##__VA_ARGS__)
#define pr_error(...) pr_trace(__VA_ARGS__)
+static uint32_t devs_max = 0;
static struct hba_device *devs;
static struct pci_device *ahci_dev;
static struct timer tmr;
@@ -567,6 +568,7 @@ ahci_hba_scan(struct ahci_hba *hba)
size_t len;
len = hba->nports * sizeof(struct hba_device);
+ devs_max = hba->nports;
if ((devs = dynalloc(len)) == NULL) {
pr_trace("failed to allocate dev descriptors\n");
return -ENOMEM;