mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-08 14:16:47 +00:00
chore: Update virtio-drivers to commit 61ece509c4 and modify max_queue_size implementation (#748)
This commit is contained in:
parent
d770de5d53
commit
b502fbf0b9
@ -47,7 +47,7 @@ num-traits = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/num
|
||||
smoltcp = { version = "=0.11.0", default-features = false, features = ["log", "alloc", "socket-raw", "socket-udp", "socket-tcp", "socket-icmp", "socket-dhcpv4", "socket-dns", "proto-ipv4", "proto-ipv6"]}
|
||||
system_error = { path = "crates/system_error" }
|
||||
unified-init = { path = "crates/unified-init" }
|
||||
virtio-drivers = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/virtio-drivers.git", rev = "f1d1cbb" }
|
||||
virtio-drivers = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/virtio-drivers.git", rev = "61ece509c4" }
|
||||
fdt = "=0.1.5"
|
||||
uefi = { version = "=0.26.0", features = ["alloc"] }
|
||||
uefi-raw = "=0.5.0"
|
||||
|
@ -276,10 +276,11 @@ impl Transport for PciTransport {
|
||||
}
|
||||
}
|
||||
|
||||
fn max_queue_size(&self) -> u32 {
|
||||
// Safe because the common config pointer is valid and we checked in get_bar_region that it
|
||||
// was aligned.
|
||||
unsafe { volread!(self.common_cfg, queue_size) }.into()
|
||||
fn max_queue_size(&mut self, queue: u16) -> u32 {
|
||||
unsafe {
|
||||
volwrite!(self.common_cfg, queue_select, queue);
|
||||
volread!(self.common_cfg, queue_size).into()
|
||||
}
|
||||
}
|
||||
|
||||
fn notify(&mut self, queue: u16) {
|
||||
@ -304,6 +305,12 @@ impl Transport for PciTransport {
|
||||
}
|
||||
}
|
||||
|
||||
fn get_status(&self) -> DeviceStatus {
|
||||
// Safe because the common config pointer is valid and we checked in get_bar_region that it
|
||||
// was aligned.
|
||||
unsafe { DeviceStatus::from_bits_truncate(volread!(self.common_cfg, device_status).into()) }
|
||||
}
|
||||
|
||||
fn set_guest_page_size(&mut self, _guest_page_size: u32) {
|
||||
// No-op, the PCI transport doesn't care.
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user