X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/5a8d4ebecaa50af25bd53c3b2236dca77a14eb81..5fc669295655ec0eea7722aa4a48921dc6b700ec:/lunaix-os/hal/ahci/ahci.c diff --git a/lunaix-os/hal/ahci/ahci.c b/lunaix-os/hal/ahci/ahci.c index 133513b..1562676 100644 --- a/lunaix-os/hal/ahci/ahci.c +++ b/lunaix-os/hal/ahci/ahci.c @@ -316,7 +316,8 @@ ahci_init_device(struct hba_port* port) // 清空任何待响应的中断 port->regs[HBA_RPxIS] = 0; - port->device = vcalloc(sizeof(struct hba_device)); + port->device = vzalloc(sizeof(struct hba_device)); + port->device->port = port; // 在命令表中构建命令FIS struct sata_reg_fis* cmd_fis = (struct sata_reg_fis*)cmd_table->command_fis;