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: sector rwm ops test code
[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 a723c204ace1b34bc7c2e0a385e889375c0e9dff..31e9725a812d7fcc9c2ab6699aa76d7a5a03b1ca 100644
(file)
--- a/
lunaix-os/hal/ahci/ahci.c
+++ b/
lunaix-os/hal/ahci/ahci.c
@@
-188,7
+188,7
@@
ahci_list_device()
kprintf("\t Port %d: %s (%x)\n",
i,
&sata_ifs[device_state],
kprintf("\t Port %d: %s (%x)\n",
i,
&sata_ifs[device_state],
- port->
regs[HBA_RPxSIG]
);
+ port->
device->flags
);
struct hba_device* dev_info = port->device;
if (!device_state || !dev_info) {
struct hba_device* dev_info = port->device;
if (!device_state || !dev_info) {
@@
-247,10
+247,9
@@
hba_alloc_slot(struct hba_port* port,
// 构建命令头(Command Header)和命令表(Command Table)
struct hba_cmdh* cmd_header = &port->cmdlst[slot];
// 构建命令头(Command Header)和命令表(Command Table)
struct hba_cmdh* cmd_header = &port->cmdlst[slot];
- struct hba_cmdt* cmd_table = valloc_dma(sizeof(struct hba_cmdt));
+ struct hba_cmdt* cmd_table = v
c
alloc_dma(sizeof(struct hba_cmdt));
memset(cmd_header, 0, sizeof(*cmd_header));
memset(cmd_header, 0, sizeof(*cmd_header));
- memset(cmd_table, 0, sizeof(*cmd_table));
// 将命令表挂到命令头上
cmd_header->cmd_table_base = vmm_v2p(cmd_table);
// 将命令表挂到命令头上
cmd_header->cmd_table_base = vmm_v2p(cmd_table);