Rerun cargo fmt to bring CI back to norm
This commit is contained in:
@@ -247,7 +247,14 @@ impl aml::Handler for AmlPhysMemHandler {
|
||||
}
|
||||
|
||||
fn read_pci_u8(&self, _segment: u16, _bus: u8, _device: u8, _function: u8, _offset: u16) -> u8 {
|
||||
log::error!("read pci u8 {:X}, {:X}, {:X}, {:X}, {:X}", _segment, _bus, _device, _function, _offset);
|
||||
log::error!(
|
||||
"read pci u8 {:X}, {:X}, {:X}, {:X}, {:X}",
|
||||
_segment,
|
||||
_bus,
|
||||
_device,
|
||||
_function,
|
||||
_offset
|
||||
);
|
||||
|
||||
0
|
||||
}
|
||||
@@ -259,7 +266,14 @@ impl aml::Handler for AmlPhysMemHandler {
|
||||
_function: u8,
|
||||
_offset: u16,
|
||||
) -> u16 {
|
||||
log::error!("read pci u16 {:X}, {:X}, {:X}, {:X}, {:X}", _segment, _bus, _device, _function, _offset);
|
||||
log::error!(
|
||||
"read pci u16 {:X}, {:X}, {:X}, {:X}, {:X}",
|
||||
_segment,
|
||||
_bus,
|
||||
_device,
|
||||
_function,
|
||||
_offset
|
||||
);
|
||||
|
||||
0
|
||||
}
|
||||
@@ -271,7 +285,14 @@ impl aml::Handler for AmlPhysMemHandler {
|
||||
_function: u8,
|
||||
_offset: u16,
|
||||
) -> u32 {
|
||||
log::error!("read pci u32 {:X}, {:X}, {:X}, {:X}, {:X}", _segment, _bus, _device, _function, _offset);
|
||||
log::error!(
|
||||
"read pci u32 {:X}, {:X}, {:X}, {:X}, {:X}",
|
||||
_segment,
|
||||
_bus,
|
||||
_device,
|
||||
_function,
|
||||
_offset
|
||||
);
|
||||
|
||||
0
|
||||
}
|
||||
@@ -284,7 +305,15 @@ impl aml::Handler for AmlPhysMemHandler {
|
||||
_offset: u16,
|
||||
_value: u8,
|
||||
) {
|
||||
log::error!("write pci u8 {:X}, {:X}, {:X}, {:X}, {:X} = {:X}", _segment, _bus, _device, _function, _offset, _value);
|
||||
log::error!(
|
||||
"write pci u8 {:X}, {:X}, {:X}, {:X}, {:X} = {:X}",
|
||||
_segment,
|
||||
_bus,
|
||||
_device,
|
||||
_function,
|
||||
_offset,
|
||||
_value
|
||||
);
|
||||
}
|
||||
fn write_pci_u16(
|
||||
&self,
|
||||
@@ -295,7 +324,15 @@ impl aml::Handler for AmlPhysMemHandler {
|
||||
_offset: u16,
|
||||
_value: u16,
|
||||
) {
|
||||
log::error!("write pci u16 {:X}, {:X}, {:X}, {:X}, {:X} = {:X}", _segment, _bus, _device, _function, _offset, _value);
|
||||
log::error!(
|
||||
"write pci u16 {:X}, {:X}, {:X}, {:X}, {:X} = {:X}",
|
||||
_segment,
|
||||
_bus,
|
||||
_device,
|
||||
_function,
|
||||
_offset,
|
||||
_value
|
||||
);
|
||||
}
|
||||
fn write_pci_u32(
|
||||
&self,
|
||||
@@ -306,7 +343,15 @@ impl aml::Handler for AmlPhysMemHandler {
|
||||
_offset: u16,
|
||||
_value: u32,
|
||||
) {
|
||||
log::error!("write pci u32 {:X}, {:X}, {:X}, {:X}, {:X} = {:X}", _segment, _bus, _device, _function, _offset, _value);
|
||||
log::error!(
|
||||
"write pci u32 {:X}, {:X}, {:X}, {:X}, {:X} = {:X}",
|
||||
_segment,
|
||||
_bus,
|
||||
_device,
|
||||
_function,
|
||||
_offset,
|
||||
_value
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -211,7 +211,9 @@ impl AmlSerdeValue {
|
||||
serialize: flags.serialize(),
|
||||
sync_level: flags.sync_level(),
|
||||
},
|
||||
AmlValue::Buffer(buffer_data) => AmlSerdeValue::Buffer({ buffer_data.lock().to_owned() }),
|
||||
AmlValue::Buffer(buffer_data) => {
|
||||
AmlSerdeValue::Buffer({ buffer_data.lock().to_owned() })
|
||||
}
|
||||
AmlValue::BufferField {
|
||||
buffer_data,
|
||||
offset,
|
||||
@@ -219,7 +221,7 @@ impl AmlSerdeValue {
|
||||
} => AmlSerdeValue::BufferField {
|
||||
offset: offset.to_owned(),
|
||||
length: length.to_owned(),
|
||||
data: { buffer_data.lock().to_owned() }
|
||||
data: { buffer_data.lock().to_owned() },
|
||||
},
|
||||
AmlValue::Processor {
|
||||
id,
|
||||
|
||||
+1
-3
@@ -18,9 +18,7 @@ fn acpi() -> Result<(), Box<dyn Error>> {
|
||||
let vendor_3 = (((vendor_rev >> 0) & 0x1f) as u8 + 64) as char;
|
||||
format!("{}{}{}{:04X}", vendor_1, vendor_2, vendor_3, device)
|
||||
}
|
||||
AmlSerdeValue::String(string) => {
|
||||
string
|
||||
},
|
||||
AmlSerdeValue::String(string) => string,
|
||||
_ => {
|
||||
log::warn!("{}: unsupported value {:x?}", name, value);
|
||||
continue;
|
||||
|
||||
+42
-9
@@ -847,36 +847,69 @@ impl Xhci {
|
||||
pub async fn detach_device(&self, port_number: usize) -> Result<()> {
|
||||
if let Some(children) = self.drivers.remove(&port_number) {
|
||||
for mut child in children {
|
||||
info!("killing driver process {} for port {}", child.id(), port_number);
|
||||
info!(
|
||||
"killing driver process {} for port {}",
|
||||
child.id(),
|
||||
port_number
|
||||
);
|
||||
match child.kill() {
|
||||
Ok(()) => {
|
||||
info!("killed driver process {} for port {}", child.id(), port_number);
|
||||
info!(
|
||||
"killed driver process {} for port {}",
|
||||
child.id(),
|
||||
port_number
|
||||
);
|
||||
match child.try_wait() {
|
||||
Ok(status_opt) => match status_opt {
|
||||
Some(status) => {
|
||||
info!("driver process {} for port {} exited with status {}", child.id(), port_number, status);
|
||||
},
|
||||
info!(
|
||||
"driver process {} for port {} exited with status {}",
|
||||
child.id(),
|
||||
port_number,
|
||||
status
|
||||
);
|
||||
}
|
||||
None => {
|
||||
//TODO: kill harder
|
||||
info!("driver process {} for port {} still running", child.id(), port_number);
|
||||
info!(
|
||||
"driver process {} for port {} still running",
|
||||
child.id(),
|
||||
port_number
|
||||
);
|
||||
}
|
||||
},
|
||||
Err(err) => {
|
||||
info!("failed to wait for the driver process {} for port {}: {}", child.id(), port_number, err);
|
||||
info!(
|
||||
"failed to wait for the driver process {} for port {}: {}",
|
||||
child.id(),
|
||||
port_number,
|
||||
err
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
warn!("failed to kill the driver process {} for port {}: {}", child.id(), port_number, err);
|
||||
warn!(
|
||||
"failed to kill the driver process {} for port {}: {}",
|
||||
child.id(),
|
||||
port_number,
|
||||
err
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(state) = self.port_states.remove(&port_number) {
|
||||
info!("disabling port slot {} for port {}", state.slot, port_number);
|
||||
info!(
|
||||
"disabling port slot {} for port {}",
|
||||
state.slot, port_number
|
||||
);
|
||||
let result = self.disable_port_slot(state.slot).await;
|
||||
info!("disabled port slot {} for port {} with result: {:?}", state.slot, port_number, result);
|
||||
info!(
|
||||
"disabled port slot {} for port {} with result: {:?}",
|
||||
state.slot, port_number, result
|
||||
);
|
||||
|
||||
result
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user