- 积分
- 16840
在线时间 小时
最后登录1970-1-1
|

楼主 |
发表于 2022-9-29 11:52:34
|
显示全部楼层
(nova-libvirt)[root@compute07 /]# lsusb -v }3 n% e; ]8 G( u& U4 G
$ b `0 U3 U2 e2 a9 Z. p
Bus 002 Device 003: ID 0781:5588 SanDisk Corp. 5 A3 R1 f' R O" n, @
Device Descriptor:( j- \4 s6 G6 |
bLength 18
; A# [# K$ ~* Y) i- E' ^" T0 u! E: K bDescriptorType 1$ ~1 P& J I( {2 F% c
bcdUSB 2.10
$ V# r. a; d4 Q [ bDeviceClass 0 (Defined at Interface level)
0 [* I$ u2 m/ q) B/ z bDeviceSubClass 0
$ o, i5 R' J( } m1 O3 R& R bDeviceProtocol 0
* |6 A: h+ ]% h* U$ V bMaxPacketSize0 64% a. p% n: Y4 f! y4 m6 `7 O
idVendor 0x0781 SanDisk Corp./ x0 k* o% ^' r
idProduct 0x5588 ! f* M1 _1 `: C. C( a, Q
bcdDevice 1.00- n% K, ~* \% W6 U
iManufacturer 2 SanDisk- l: m' s, i# R" }+ D/ f. w
iProduct 3 USB Extreme Pro% z0 _( |- A5 x8 R6 H, \, u+ D. f
iSerial 1 00000000000000000000
. _7 l R0 b6 e- d bNumConfigurations 1
% s, S }( C: B. H Configuration Descriptor:
# C/ [; {/ Y& U: o" @' e7 L bLength 9- F# n; Q" Q6 [2 @, L; ~
bDescriptorType 2' J. P# T. T# s2 k0 L* ?) {
wTotalLength 32/ R. u6 s2 ~2 e6 V3 m! l- s! n8 z
bNumInterfaces 1
2 Y- D# G2 h: J5 C( l2 h" d bConfigurationValue 1$ b$ q }+ }3 ` s# F$ I. T T
iConfiguration 0
% \$ Y# F" n) M+ X* V+ Z bmAttributes 0xc0
# M" u0 }! o3 x7 `7 t4 O {$ ~ Self Powered
! J3 C5 X3 i8 u+ _& K" U9 g( b MaxPower 0mA9 N5 {/ m6 p ~% o' C, K$ n
Interface Descriptor:
4 I7 s5 O: i7 D bLength 9
) z$ v8 ?& X1 B$ E- E bDescriptorType 4
. C* M' s9 R! B8 ^ bInterfaceNumber 0
. V) r5 @- V" ?- d5 Z$ k0 Q1 |8 Y bAlternateSetting 0
$ z. D* S2 @: x bNumEndpoints 2" h8 _: y) }; L9 {
bInterfaceClass 8 Mass Storage8 U# {7 `: b$ ^8 @* Z1 d
bInterfaceSubClass 6 SCSI
! i4 H4 \( w) q/ q: e bInterfaceProtocol 80 Bulk-Only
2 D) z/ u+ E. d iInterface 0 ! Y8 Z8 s3 h: V, c# k; K
Endpoint Descriptor:, W _, i: O' u. l2 N/ }
bLength 7
7 y; a g D7 H4 l; u" i$ L5 B. g bDescriptorType 59 V1 z0 I. Q% [# C+ a. W9 w# C. Q
bEndpointAddress 0x81 EP 1 IN/ A& m0 P. p9 O$ E! U8 Z
bmAttributes 2
% g% W9 P2 y+ r, g3 ?' F Transfer Type Bulk
M% [* q& t: L9 b& o Synch Type None8 D0 V! p; l' B8 F
Usage Type Data
9 B# {7 }: \7 D wMaxPacketSize 0x0200 1x 512 bytes
: j5 }! F" ~1 t' Z' x. j5 V bInterval 04 \) m6 }: D; D% t+ g4 @
Endpoint Descriptor:
5 `% O" f( a! |; |( W# p5 a bLength 74 x5 f; \, ~3 X
bDescriptorType 5
6 w+ F$ x& v% l bEndpointAddress 0x02 EP 2 OUT, c6 z8 m( y$ \) v
bmAttributes 2; Z/ s" y* T- h. k$ i" X* h4 O
Transfer Type Bulk; H1 A% C% R+ \0 L
Synch Type None6 n8 B8 R# l" M
Usage Type Data
6 p4 o9 V% c K wMaxPacketSize 0x0200 1x 512 bytes5 V# q/ @( R/ N$ w$ A8 k+ j
bInterval 0
! D# H; W" X7 U) v) {$ ~6 j1 f8 M- w7 G2 X+ i
(nova-libvirt)[root@compute07 /]# cat usb.xml 0 f. V- F9 m0 E; W7 J* _
<hostdev mode='subsystem' type='usb'>
/ p1 T( @3 f1 T, d" d<source startupPolicy='optional'>( P( y4 N# T4 s, S) E
<vendor id='0x0781'/>, o& r. T2 i* @6 x5 u
<product id='0x5588'/># k4 h5 A! ?; `( e
</source>7 h& Q+ }) q% m9 t7 {% v
</hostdev>
8 N& f: K% l. w
- `" p; o; a) s& D& {
; A1 P# }) ~$ Z' W7 B) G; k, k# l(nova-libvirt)[root@compute07 /]# virsh attach-device instance-00000162 usb.xml5 f+ d' o- D' \2 G
Device attached successfully$ W9 \2 x2 N' f% w5 M; q
* {3 P8 t5 g8 v: n6 g
2 |$ S1 s, n/ e* n2 V
* ]9 z# M S) f ^) q4 E+ B |
|