summary refs log tree commit diff
path: root/devices/src/usb
diff options
context:
space:
mode:
Diffstat (limited to 'devices/src/usb')
-rw-r--r--devices/src/usb/host_backend/context.rs6
-rw-r--r--devices/src/usb/host_backend/error.rs2
-rw-r--r--devices/src/usb/host_backend/host_device.rs20
-rw-r--r--devices/src/usb/host_backend/hotplug.rs4
-rw-r--r--devices/src/usb/host_backend/usb_endpoint.rs10
-rw-r--r--devices/src/usb/host_backend/utils.rs4
-rw-r--r--devices/src/usb/xhci/xhci_transfer.rs4
7 files changed, 25 insertions, 25 deletions
diff --git a/devices/src/usb/host_backend/context.rs b/devices/src/usb/host_backend/context.rs
index 5d8b689..4acd752 100644
--- a/devices/src/usb/host_backend/context.rs
+++ b/devices/src/usb/host_backend/context.rs
@@ -3,14 +3,14 @@
 // found in the LICENSE file.
 
 use super::error::*;
-use crate::usb::usb_util::hotplug::UsbHotplugHandler;
-use crate::usb::usb_util::libusb_context::{LibUsbContext, LibUsbPollfdChangeHandler};
-use crate::usb::usb_util::libusb_device::LibUsbDevice;
 use crate::utils::{EventHandler, EventLoop};
 use std::os::raw::c_short;
 use std::os::unix::io::RawFd;
 use std::sync::{Arc, Weak};
 use sys_util::WatchingEvents;
+use usb_util::hotplug::UsbHotplugHandler;
+use usb_util::libusb_context::{LibUsbContext, LibUsbPollfdChangeHandler};
+use usb_util::libusb_device::LibUsbDevice;
 use vm_control::MaybeOwnedFd;
 
 /// Context wraps libusb context with libusb event handling.
diff --git a/devices/src/usb/host_backend/error.rs b/devices/src/usb/host_backend/error.rs
index c9906ca..17ac191 100644
--- a/devices/src/usb/host_backend/error.rs
+++ b/devices/src/usb/host_backend/error.rs
@@ -2,12 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-use crate::usb::usb_util::error::Error as UsbUtilError;
 use crate::usb::xhci::scatter_gather_buffer::Error as BufferError;
 use crate::usb::xhci::xhci_transfer::Error as XhciTransferError;
 use crate::utils::Error as UtilsError;
 use msg_socket::MsgError;
 use std::fmt::{self, Display};
+use usb_util::error::Error as UsbUtilError;
 
 #[derive(Debug)]
 pub enum Error {
diff --git a/devices/src/usb/host_backend/host_device.rs b/devices/src/usb/host_backend/host_device.rs
index 8a47037..00cd876 100644
--- a/devices/src/usb/host_backend/host_device.rs
+++ b/devices/src/usb/host_backend/host_device.rs
@@ -9,22 +9,22 @@ use sync::Mutex;
 use super::error::*;
 use super::usb_endpoint::UsbEndpoint;
 use super::utils::{submit_transfer, update_transfer_state};
-use crate::usb::usb_util::device_handle::DeviceHandle;
-use crate::usb::usb_util::error::Error as LibUsbError;
-use crate::usb::usb_util::libusb_device::LibUsbDevice;
-use crate::usb::usb_util::types::{
-    ControlRequestDataPhaseTransferDirection, ControlRequestRecipient, ControlRequestType,
-    StandardControlRequest, UsbRequestSetup,
-};
-use crate::usb::usb_util::usb_transfer::{
-    control_transfer, ControlTransferBuffer, TransferStatus, UsbTransfer,
-};
 use crate::usb::xhci::scatter_gather_buffer::ScatterGatherBuffer;
 use crate::usb::xhci::xhci_backend_device::{BackendType, UsbDeviceAddress, XhciBackendDevice};
 use crate::usb::xhci::xhci_transfer::{XhciTransfer, XhciTransferState, XhciTransferType};
 use crate::utils::AsyncJobQueue;
 use crate::utils::FailHandle;
 use std::collections::HashMap;
+use usb_util::device_handle::DeviceHandle;
+use usb_util::error::Error as LibUsbError;
+use usb_util::libusb_device::LibUsbDevice;
+use usb_util::types::{
+    ControlRequestDataPhaseTransferDirection, ControlRequestRecipient, ControlRequestType,
+    StandardControlRequest, UsbRequestSetup,
+};
+use usb_util::usb_transfer::{
+    control_transfer, ControlTransferBuffer, TransferStatus, UsbTransfer,
+};
 
 #[derive(PartialEq)]
 pub enum ControlEndpointState {
diff --git a/devices/src/usb/host_backend/hotplug.rs b/devices/src/usb/host_backend/hotplug.rs
index 8abcfd6..ab1c66d 100644
--- a/devices/src/usb/host_backend/hotplug.rs
+++ b/devices/src/usb/host_backend/hotplug.rs
@@ -4,9 +4,9 @@
 
 use std::sync::Arc;
 
-use crate::usb::usb_util::hotplug::{HotplugEvent, UsbHotplugHandler};
-use crate::usb::usb_util::libusb_device::LibUsbDevice;
 use crate::usb::xhci::usb_hub::UsbHub;
+use usb_util::hotplug::{HotplugEvent, UsbHotplugHandler};
+use usb_util::libusb_device::LibUsbDevice;
 
 pub struct HotplugHandler {
     hub: Arc<UsbHub>,
diff --git a/devices/src/usb/host_backend/usb_endpoint.rs b/devices/src/usb/host_backend/usb_endpoint.rs
index 7678b88..f562110 100644
--- a/devices/src/usb/host_backend/usb_endpoint.rs
+++ b/devices/src/usb/host_backend/usb_endpoint.rs
@@ -8,17 +8,17 @@ use sync::Mutex;
 
 use super::error::*;
 use super::utils::{submit_transfer, update_transfer_state};
-use crate::usb::usb_util::device_handle::DeviceHandle;
-use crate::usb::usb_util::types::{EndpointDirection, EndpointType, ENDPOINT_DIRECTION_OFFSET};
-use crate::usb::usb_util::usb_transfer::{
-    bulk_transfer, interrupt_transfer, BulkTransferBuffer, TransferStatus, UsbTransfer,
-};
 use crate::usb::xhci::scatter_gather_buffer::ScatterGatherBuffer;
 use crate::usb::xhci::xhci_transfer::{
     TransferDirection, XhciTransfer, XhciTransferState, XhciTransferType,
 };
 use crate::utils::AsyncJobQueue;
 use crate::utils::FailHandle;
+use usb_util::device_handle::DeviceHandle;
+use usb_util::types::{EndpointDirection, EndpointType, ENDPOINT_DIRECTION_OFFSET};
+use usb_util::usb_transfer::{
+    bulk_transfer, interrupt_transfer, BulkTransferBuffer, TransferStatus, UsbTransfer,
+};
 
 /// Isochronous, Bulk or Interrupt endpoint.
 pub struct UsbEndpoint {
diff --git a/devices/src/usb/host_backend/utils.rs b/devices/src/usb/host_backend/utils.rs
index 9805f39..d88a1a5 100644
--- a/devices/src/usb/host_backend/utils.rs
+++ b/devices/src/usb/host_backend/utils.rs
@@ -7,11 +7,11 @@ use std::sync::Arc;
 use sync::Mutex;
 
 use super::error::*;
-use crate::usb::usb_util::device_handle::DeviceHandle;
-use crate::usb::usb_util::usb_transfer::{TransferStatus, UsbTransfer, UsbTransferBuffer};
 use crate::usb::xhci::xhci_transfer::{XhciTransfer, XhciTransferState};
 use crate::utils::AsyncJobQueue;
 use crate::utils::FailHandle;
+use usb_util::device_handle::DeviceHandle;
+use usb_util::usb_transfer::{TransferStatus, UsbTransfer, UsbTransferBuffer};
 
 /// Helper function to update xhci_transfer state.
 pub fn update_transfer_state<T: UsbTransferBuffer>(
diff --git a/devices/src/usb/xhci/xhci_transfer.rs b/devices/src/usb/xhci/xhci_transfer.rs
index eb50435..421c5b1 100644
--- a/devices/src/usb/xhci/xhci_transfer.rs
+++ b/devices/src/usb/xhci/xhci_transfer.rs
@@ -10,14 +10,14 @@ use super::xhci_abi::{
     TrbCompletionCode, TrbType,
 };
 use super::xhci_regs::MAX_INTERRUPTER;
-use crate::usb::usb_util::types::UsbRequestSetup;
-use crate::usb::usb_util::usb_transfer::TransferStatus;
 use std::cmp::min;
 use std::fmt::{self, Display};
 use std::mem;
 use std::sync::{Arc, Weak};
 use sync::Mutex;
 use sys_util::{Error as SysError, EventFd, GuestMemory};
+use usb_util::types::UsbRequestSetup;
+use usb_util::usb_transfer::TransferStatus;
 
 #[derive(Debug)]
 pub enum Error {