Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
808aeb98
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看板
提交
808aeb98
编写于
2月 24, 2012
作者:
G
Gerd Hoffmann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
usb: add tracepoint for usb packet state changes.
Signed-off-by:
N
Gerd Hoffmann
<
kraxel@redhat.com
>
上级
7d1994f8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
22 deletion
+8
-22
hw/usb.c
hw/usb.c
+5
-22
trace-events
trace-events
+3
-0
未找到文件。
hw/usb.c
浏览文件 @
808aeb98
...
...
@@ -26,6 +26,7 @@
#include "qemu-common.h"
#include "usb.h"
#include "iov.h"
#include "trace.h"
void
usb_attach
(
USBPort
*
port
)
{
...
...
@@ -390,7 +391,6 @@ void usb_packet_init(USBPacket *p)
void
usb_packet_set_state
(
USBPacket
*
p
,
USBPacketState
state
)
{
#ifdef DEBUG
static
const
char
*
name
[]
=
{
[
USB_PACKET_UNDEFINED
]
=
"undef"
,
[
USB_PACKET_SETUP
]
=
"setup"
,
...
...
@@ -399,28 +399,11 @@ void usb_packet_set_state(USBPacket *p, USBPacketState state)
[
USB_PACKET_COMPLETE
]
=
"complete"
,
[
USB_PACKET_CANCELED
]
=
"canceled"
,
};
static
const
char
*
rets
[]
=
{
[
-
USB_RET_NODEV
]
=
"NODEV"
,
[
-
USB_RET_NAK
]
=
"NAK"
,
[
-
USB_RET_STALL
]
=
"STALL"
,
[
-
USB_RET_BABBLE
]
=
"BABBLE"
,
[
-
USB_RET_ASYNC
]
=
"ASYNC"
,
};
char
add
[
16
]
=
""
;
USBDevice
*
dev
=
p
->
ep
->
dev
;
USBBus
*
bus
=
usb_bus_from_device
(
dev
);
if
(
state
==
USB_PACKET_COMPLETE
)
{
if
(
p
->
result
<
0
)
{
snprintf
(
add
,
sizeof
(
add
),
" - %s"
,
rets
[
-
p
->
result
]);
}
else
{
snprintf
(
add
,
sizeof
(
add
),
" - %d"
,
p
->
result
);
}
}
fprintf
(
stderr
,
"bus %s, port %s, dev %d, ep %d: packet %p: %s -> %s%s
\n
"
,
p
->
ep
->
dev
->
qdev
.
parent_bus
->
name
,
p
->
ep
->
dev
->
port
->
path
,
p
->
ep
->
dev
->
addr
,
p
->
ep
->
nr
,
p
,
name
[
p
->
state
],
name
[
state
],
add
);
#endif
trace_usb_packet_state_change
(
bus
->
busnr
,
dev
->
port
->
path
,
p
->
ep
->
nr
,
p
,
name
[
p
->
state
],
name
[
state
]);
p
->
state
=
state
;
}
...
...
trace-events
浏览文件 @
808aeb98
...
...
@@ -227,6 +227,9 @@ sun4m_iommu_page_get_flags(uint64_t pa, uint64_t iopte, uint32_t ret) "get flags
sun4m_iommu_translate_pa(uint64_t addr, uint64_t pa, uint32_t iopte) "xlate dva %"PRIx64" => pa %"PRIx64" iopte = %x"
sun4m_iommu_bad_addr(uint64_t addr) "bad addr %"PRIx64
# hw/usb.c
usb_packet_state_change(int bus, const char *port, int ep, void *p, const char *o, const char *n) "bus %d, port %s, ep %d, packet %p, state %s -> %s"
# hw/usb-bus.c
usb_port_claim(int bus, const char *port) "bus %d, port %s"
usb_port_attach(int bus, const char *port) "bus %d, port %s"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录