git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: twifs - pseudo file system for lunaix kernel state exposure
[lunaix-os.git]
/
lunaix-os
/
hal
/
ahci
/
ahci.c
diff --git
a/lunaix-os/hal/ahci/ahci.c
b/lunaix-os/hal/ahci/ahci.c
index 133513b049e096d74542c7f2ce9a20cff4cf4d17..156267605b013a1189c800ea52ce841dfbb67ce6 100644
(file)
--- 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->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;
// 在命令表中构建命令FIS
struct sata_reg_fis* cmd_fis = (struct sata_reg_fis*)cmd_table->command_fis;