mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 12:16:31 +00:00
将具体磁盘类型与fat32文件系统进行分离
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#include "usb.h"
|
||||
#include "xhci/xhci.h"
|
||||
#include <common/kprint.h>
|
||||
#include <common/errno.h>
|
||||
#include <driver/pci/pci.h>
|
||||
#include <debug/bug.h>
|
||||
#include <common/spinlock.h>
|
||||
@ -28,7 +29,7 @@ int usb_init()
|
||||
if (WARN_ON(usb_pdevs_count == 0))
|
||||
{
|
||||
kwarn("There is no usb hardware in this computer!");
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
kdebug("usb_pdevs_count=%d", usb_pdevs_count);
|
||||
// 初始化每个usb控制器
|
||||
@ -54,7 +55,7 @@ int usb_init()
|
||||
|
||||
default:
|
||||
kerror("Error value of usb_pdevs[%d]->ProgIF: %#02x", i, usb_pdevs[i]->ProgIF);
|
||||
return;
|
||||
return -EINVAL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1704,7 +1704,7 @@ void xhci_init(struct pci_device_structure_general_device_t *dev_hdr)
|
||||
// 创建scratchpad buffers
|
||||
for (int i = 0; i < max_scratchpad_buf; ++i)
|
||||
{
|
||||
uint64_t buf_vaddr = kzalloc(xhci_hc[cid].page_size, 0);
|
||||
uint64_t buf_vaddr = (uint64_t)kzalloc(xhci_hc[cid].page_size, 0);
|
||||
__write8b(xhci_hc[cid].scratchpad_buf_array_vaddr, virt_2_phys(buf_vaddr));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user