summary refs log tree commit diff
path: root/devices/src/usb/xhci
diff options
context:
space:
mode:
authorJingkui Wang <jkwang@google.com>2019-03-08 13:21:02 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-03-16 15:25:23 -0700
commit257d004b0ce0376e39fb8f94d2347eaf0e1d65ff (patch)
tree5a51bef7e2feac624b12b4372fee8f5394693fd5 /devices/src/usb/xhci
parent874f2e83ed9ad5eaafa0d9b434e2083bdda86e62 (diff)
downloadcrosvm-257d004b0ce0376e39fb8f94d2347eaf0e1d65ff.tar
crosvm-257d004b0ce0376e39fb8f94d2347eaf0e1d65ff.tar.gz
crosvm-257d004b0ce0376e39fb8f94d2347eaf0e1d65ff.tar.bz2
crosvm-257d004b0ce0376e39fb8f94d2347eaf0e1d65ff.tar.lz
crosvm-257d004b0ce0376e39fb8f94d2347eaf0e1d65ff.tar.xz
crosvm-257d004b0ce0376e39fb8f94d2347eaf0e1d65ff.tar.zst
crosvm-257d004b0ce0376e39fb8f94d2347eaf0e1d65ff.zip
usb: add host backend
Host backend implement backend device. It will attach a read device to
xhci controller.

Also squashed from ce6b35, author: zachr@.

CQ-DEPEND=CL:1510820
BUG=chromium:831850
TEST=local build

Change-Id: Idcf2d7d6aca92de9859b7c38d1bf1d98032eae91
Reviewed-on: https://chromium-review.googlesource.com/1512761
Commit-Ready: Jingkui Wang <jkwang@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'devices/src/usb/xhci')
-rw-r--r--devices/src/usb/xhci/mod.rs12
-rw-r--r--devices/src/usb/xhci/xhci_transfer.rs4
2 files changed, 7 insertions, 9 deletions
diff --git a/devices/src/usb/xhci/mod.rs b/devices/src/usb/xhci/mod.rs
index f181529..3aabdc6 100644
--- a/devices/src/usb/xhci/mod.rs
+++ b/devices/src/usb/xhci/mod.rs
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-extern crate usb_util;
-
 mod command_ring_controller;
 mod device_slot;
 mod event_ring;
@@ -12,12 +10,12 @@ mod intr_resample_handler;
 mod ring_buffer;
 mod ring_buffer_controller;
 mod ring_buffer_stop_cb;
-mod scatter_gather_buffer;
+pub mod scatter_gather_buffer;
 mod transfer_ring_controller;
-mod usb_hub;
+pub mod usb_hub;
 mod xhci_abi;
 mod xhci_abi_schema;
-mod xhci_backend_device;
-mod xhci_backend_device_provider;
+pub mod xhci_backend_device;
+pub mod xhci_backend_device_provider;
 mod xhci_regs;
-mod xhci_transfer;
+pub mod xhci_transfer;
diff --git a/devices/src/usb/xhci/xhci_transfer.rs b/devices/src/usb/xhci/xhci_transfer.rs
index 9dc64ea..76fecdc 100644
--- a/devices/src/usb/xhci/xhci_transfer.rs
+++ b/devices/src/usb/xhci/xhci_transfer.rs
@@ -5,8 +5,6 @@
 use super::interrupter::{Error as InterrupterError, Interrupter};
 use super::scatter_gather_buffer::{Error as BufferError, ScatterGatherBuffer};
 use super::usb_hub::{Error as HubError, UsbPort};
-use super::usb_util::types::UsbRequestSetup;
-use super::usb_util::usb_transfer::TransferStatus;
 use super::xhci_abi::{
     AddressedTrb, Error as TrbError, EventDataTrb, SetupStageTrb, TransferDescriptor, TrbCast,
     TrbCompletionCode, TrbType,
@@ -18,6 +16,8 @@ use std::mem;
 use std::sync::{Arc, Weak};
 use sync::Mutex;
 use sys_util::{Error as SysError, EventFd, GuestMemory};
+use usb::usb_util::types::UsbRequestSetup;
+use usb::usb_util::usb_transfer::TransferStatus;
 
 #[derive(Debug)]
 pub enum Error {