Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
97df650b
Q
qemu
项目概览
openeuler
/
qemu
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
97df650b
编写于
5月 11, 2012
作者:
G
Gerd Hoffmann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xhci: trace: transfers
Signed-off-by:
N
Gerd Hoffmann
<
kraxel@redhat.com
>
上级
c1f6b493
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
8 deletion
+16
-8
hw/usb/hcd-xhci.c
hw/usb/hcd-xhci.c
+10
-8
trace-events
trace-events
+6
-0
未找到文件。
hw/usb/hcd-xhci.c
浏览文件 @
97df650b
...
...
@@ -1402,12 +1402,14 @@ static int xhci_setup_packet(XHCITransfer *xfer, USBDevice *dev)
static
int
xhci_complete_packet
(
XHCITransfer
*
xfer
,
int
ret
)
{
if
(
ret
==
USB_RET_ASYNC
)
{
trace_usb_xhci_xfer_async
(
xfer
);
xfer
->
running_async
=
1
;
xfer
->
running_retry
=
0
;
xfer
->
complete
=
0
;
xfer
->
cancelled
=
0
;
return
0
;
}
else
if
(
ret
==
USB_RET_NAK
)
{
trace_usb_xhci_xfer_nak
(
xfer
);
xfer
->
running_async
=
0
;
xfer
->
running_retry
=
1
;
xfer
->
complete
=
0
;
...
...
@@ -1422,10 +1424,12 @@ static int xhci_complete_packet(XHCITransfer *xfer, int ret)
if
(
ret
>=
0
)
{
xfer
->
status
=
CC_SUCCESS
;
xhci_xfer_data
(
xfer
,
xfer
->
data
,
ret
,
xfer
->
in_xfer
,
0
,
1
);
trace_usb_xhci_xfer_success
(
xfer
,
ret
);
return
0
;
}
/* error */
trace_usb_xhci_xfer_error
(
xfer
,
ret
);
switch
(
ret
)
{
case
USB_RET_NODEV
:
xfer
->
status
=
CC_USB_TRANSACTION_ERROR
;
...
...
@@ -1461,11 +1465,12 @@ static int xhci_fire_ctl_transfer(XHCIState *xhci, XHCITransfer *xfer)
USBDevice
*
dev
;
int
ret
;
DPRINTF
(
"xhci_fire_ctl_transfer(slot=%d)
\n
"
,
xfer
->
slotid
);
trb_setup
=
&
xfer
->
trbs
[
0
];
trb_status
=
&
xfer
->
trbs
[
xfer
->
trb_count
-
1
];
trace_usb_xhci_xfer_start
(
xfer
,
xfer
->
slotid
,
xfer
->
epid
,
trb_setup
->
parameter
>>
48
);
/* at most one Event Data TRB allowed after STATUS */
if
(
TRB_TYPE
(
*
trb_status
)
==
TR_EVDATA
&&
xfer
->
trb_count
>
2
)
{
trb_status
--
;
...
...
@@ -1606,15 +1611,14 @@ static int xhci_fire_transfer(XHCIState *xhci, XHCITransfer *xfer, XHCIEPContext
unsigned
int
length
=
0
;
XHCITRB
*
trb
;
DPRINTF
(
"xhci_fire_transfer(slotid=%d,epid=%d)
\n
"
,
xfer
->
slotid
,
xfer
->
epid
);
for
(
i
=
0
;
i
<
xfer
->
trb_count
;
i
++
)
{
trb
=
&
xfer
->
trbs
[
i
];
if
(
TRB_TYPE
(
*
trb
)
==
TR_NORMAL
||
TRB_TYPE
(
*
trb
)
==
TR_ISOCH
)
{
length
+=
trb
->
status
&
0x1ffff
;
}
}
DPRINTF
(
"xhci: total TD length=%d
\n
"
,
length
);
trace_usb_xhci_xfer_start
(
xfer
,
xfer
->
slotid
,
xfer
->
epid
,
length
);
if
(
!
epctx
->
has_bg
)
{
xfer
->
data_length
=
length
;
...
...
@@ -1670,15 +1674,13 @@ static void xhci_kick_ep(XHCIState *xhci, unsigned int slotid, unsigned int epid
XHCITransfer
*
xfer
=
epctx
->
retry
;
int
result
;
DPRINTF
(
"xhci: retry nack'ed transfer ...
\n
"
);
trace_usb_xhci_xfer_retry
(
xfer
);
assert
(
xfer
->
running_retry
);
xhci_setup_packet
(
xfer
,
xfer
->
packet
.
ep
->
dev
);
result
=
usb_handle_packet
(
xfer
->
packet
.
ep
->
dev
,
&
xfer
->
packet
);
if
(
result
==
USB_RET_NAK
)
{
DPRINTF
(
"xhci: ... xfer still nacked
\n
"
);
return
;
}
DPRINTF
(
"xhci: ... result %d
\n
"
,
result
);
xhci_complete_packet
(
xfer
,
result
);
assert
(
!
xfer
->
running_retry
);
epctx
->
retry
=
NULL
;
...
...
trace-events
浏览文件 @
97df650b
...
...
@@ -311,6 +311,12 @@ usb_xhci_ep_disable(uint32_t slotid, uint32_t epid) "slotid %d, epid %d"
usb_xhci_ep_kick(uint32_t slotid, uint32_t epid) "slotid %d, epid %d"
usb_xhci_ep_stop(uint32_t slotid, uint32_t epid) "slotid %d, epid %d"
usb_xhci_ep_reset(uint32_t slotid, uint32_t epid) "slotid %d, epid %d"
usb_xhci_xfer_start(void *xfer, uint32_t slotid, uint32_t epid, uint32_t length) "%p: slotid %d, epid %d, length %d"
usb_xhci_xfer_async(void *xfer) "%p"
usb_xhci_xfer_nak(void *xfer) "%p"
usb_xhci_xfer_retry(void *xfer) "%p"
usb_xhci_xfer_success(void *xfer, uint32_t bytes) "%p: len %d"
usb_xhci_xfer_error(void *xfer, uint32_t ret) "%p: ret %d"
# hw/usb/desc.c
usb_desc_device(int addr, int len, int ret) "dev %d query device, len %d, ret %d"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录