|
|
楼主 |
发表于 2022-9-29 11:52:34
|
显示全部楼层
(nova-libvirt)[root@compute07 /]# lsusb -v
9 k9 [2 n6 b! Y4 ?7 y" e, i
, k$ r e' j& Y% ? K) LBus 002 Device 003: ID 0781:5588 SanDisk Corp. ^- C- f8 L$ v7 o& P
Device Descriptor:
6 Z1 ]9 v; H: T) F bLength 18% ^- N" F. V8 C! y* B6 G
bDescriptorType 1
/ U) [: O6 J* | bcdUSB 2.10- j4 ^( M. L% \( }+ o
bDeviceClass 0 (Defined at Interface level)
- p7 y' K4 [9 q bDeviceSubClass 0
$ \ Z0 M9 _+ D* T1 _; q9 C bDeviceProtocol 0 1 m: }$ P, |$ N* C1 Y
bMaxPacketSize0 64
( {9 q: a: ] {5 z" R idVendor 0x0781 SanDisk Corp.
) J8 x/ z `! [" @ k( x* `. a# G idProduct 0x5588 / ?& [- `- U1 R. t! L" e$ _
bcdDevice 1.00
6 X$ F( h7 b; d b; k' s1 | iManufacturer 2 SanDisk
# S! O( R2 e2 b; N4 Q6 _6 I3 a iProduct 3 USB Extreme Pro0 x& P: V# `* s# i
iSerial 1 000000000000000000008 P# V+ h6 V, s r6 c7 }: D: a( s w
bNumConfigurations 1+ X4 G: z& M) K; g$ F
Configuration Descriptor:
8 D, ^* _# {& s" R bLength 9# F q, S2 [) n; f
bDescriptorType 2
3 k; ~, F3 l. q wTotalLength 326 [- m5 L) E0 b0 K+ |! W
bNumInterfaces 1
. F5 ~: S* i& ^6 v bConfigurationValue 1/ z- P* U7 g" x! C2 E5 u- _
iConfiguration 0
8 P1 C0 b9 I+ l0 Y3 m bmAttributes 0xc0, u3 s# w/ u. F9 O- D; Z5 b" x
Self Powered% z1 w% d' T: ]
MaxPower 0mA% Y% G, F' r1 `: S. ]: |0 J# ]
Interface Descriptor:
2 n- c* D1 ^' P: r) ]- ` K bLength 94 d$ A4 x/ Z" N' n* h( R8 A$ y
bDescriptorType 4
; E) g! D8 Z8 ~; }( G+ d$ X! L+ o bInterfaceNumber 0' d. a2 U; B+ f6 e9 h7 Y- X, U/ F
bAlternateSetting 0
3 O0 r: A9 @" _ bNumEndpoints 2& v0 c+ t9 I' w9 D" d* U
bInterfaceClass 8 Mass Storage
8 _3 O" u5 }; i8 d bInterfaceSubClass 6 SCSI9 O% J5 K3 t1 b5 J# X* n
bInterfaceProtocol 80 Bulk-Only7 t' h4 H9 U: L& M$ U$ G
iInterface 0 % A3 k% h+ H: K. G2 S) [
Endpoint Descriptor:: }& g' s% O, |9 ?5 Y! G
bLength 76 j1 u( V/ e4 D) ^. g
bDescriptorType 5- i0 J& ?3 c: D. |0 U
bEndpointAddress 0x81 EP 1 IN
( H4 ~/ h: z8 N: Y% q# e! `, ^$ V bmAttributes 2
6 \: @9 m" K0 V" Y4 f& c Transfer Type Bulk
: B( z$ g& `5 b+ \3 K/ Q6 V Synch Type None
2 c M3 T" v* ~2 i8 X9 v Usage Type Data C& h0 a7 |9 |' d. ]+ o
wMaxPacketSize 0x0200 1x 512 bytes: L$ J1 ]- c8 ~" [
bInterval 05 a) [/ t) c5 e
Endpoint Descriptor:% ~' Q) p2 J3 c7 `: z
bLength 7
0 R4 c5 ]5 b6 t. p O; Z bDescriptorType 5+ x" L* D Z8 G) ^2 e. g( s6 T
bEndpointAddress 0x02 EP 2 OUT7 W. |0 z3 a7 M3 V. J) G( P
bmAttributes 2
4 j6 ]; n% |2 }8 q8 y- t; c Transfer Type Bulk& v; k- G- |5 A) n6 l
Synch Type None
6 i+ r- _! s# d8 n3 X Usage Type Data! o( O5 E- l* \3 c+ W
wMaxPacketSize 0x0200 1x 512 bytes0 M( L" G5 Y8 d3 S7 G' [
bInterval 0
9 l; T& J8 _8 ]
0 i( d. S _+ V: O# I2 h(nova-libvirt)[root@compute07 /]# cat usb.xml 9 q) Y, o) l/ W$ l( S9 s2 E. h
<hostdev mode='subsystem' type='usb'>
' w& |1 i5 K9 S$ [<source startupPolicy='optional'>
1 H( K9 `# w+ K/ G* \<vendor id='0x0781'/>$ d6 `* N6 s, b! {
<product id='0x5588'/>
% v8 c, o! Q+ ~7 ^% w6 H</source>
" ]0 w0 A& Z: }7 ^% ~</hostdev>( X$ [( J* i% Q9 T1 ~. w( ~
" T# [" x7 R0 I5 _. k
0 v$ X! H+ H- b, a x$ I(nova-libvirt)[root@compute07 /]# virsh attach-device instance-00000162 usb.xml7 R% s7 G" n1 m
Device attached successfully- [9 x, C$ w6 W+ s' d
. ?2 k' e' A! B8 E/ J0 _1 V/ |& ?% g7 Q4 d4 D7 h6 V A
W* J7 Q# U' d
|
|