Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
5f796752
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
5f796752
编写于
8月 27, 2007
作者:
M
Mauro Carvalho Chehab
提交者:
Mauro Carvalho Chehab
5月 18, 2010
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
V4L/DVB (12790): tm6000: check for errors on usb->status
Signed-off-by:
N
Mauro Carvalho Chehab
<
mchehab@redhat.com
>
上级
5c0d0b21
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
51 addition
and
34 deletion
+51
-34
drivers/staging/tm6000/tm6000-video.c
drivers/staging/tm6000/tm6000-video.c
+51
-34
未找到文件。
drivers/staging/tm6000/tm6000-video.c
浏览文件 @
5f796752
...
...
@@ -163,7 +163,7 @@ static void inline buffer_filled (struct tm6000_core *dev,
struct
tm6000_buffer
*
buf
)
{
/* Advice that buffer was filled */
dprintk
(
dev
,
V4L2_DEBUG_
QUEUE
,
"[%p/%d] wakeup
\n
"
,
buf
,
buf
->
vb
.
i
);
dprintk
(
dev
,
V4L2_DEBUG_
ISOC
,
"[%p/%d] wakeup
\n
"
,
buf
,
buf
->
vb
.
i
);
buf
->
vb
.
state
=
STATE_DONE
;
buf
->
vb
.
field_count
++
;
do_gettimeofday
(
&
buf
->
vb
.
ts
);
...
...
@@ -314,7 +314,7 @@ static int copy_multiplexed(u8 *ptr, u8 *out_p, unsigned long len,
pos
=
0
;
/* Announces that a new buffer were filled */
buffer_filled
(
dev
,
*
buf
);
dprintk
(
dev
,
V4L2_DEBUG_
QUEUE
,
"new buffer filled
\n
"
);
dprintk
(
dev
,
V4L2_DEBUG_
ISOC
,
"new buffer filled
\n
"
);
rc
=
get_next_buf
(
dma_q
,
buf
);
if
(
rc
<=
0
)
{
...
...
@@ -329,6 +329,47 @@ static int copy_multiplexed(u8 *ptr, u8 *out_p, unsigned long len,
return
rc
;
}
static
void
inline
print_err_status
(
struct
tm6000_core
*
dev
,
int
packet
,
int
status
)
{
char
*
errmsg
=
"Unknown"
;
switch
(
status
)
{
case
-
ENOENT
:
errmsg
=
"unlinked synchronuously"
;
break
;
case
-
ECONNRESET
:
errmsg
=
"unlinked asynchronuously"
;
break
;
case
-
ENOSR
:
errmsg
=
"Buffer error (overrun)"
;
break
;
case
-
EPIPE
:
errmsg
=
"Stalled (device not responding)"
;
break
;
case
-
EOVERFLOW
:
errmsg
=
"Babble (bad cable?)"
;
break
;
case
-
EPROTO
:
errmsg
=
"Bit-stuff error (bad cable?)"
;
break
;
case
-
EILSEQ
:
errmsg
=
"CRC/Timeout (could be anything)"
;
break
;
case
-
ETIME
:
errmsg
=
"Device does not respond"
;
break
;
}
if
(
packet
<
0
)
{
dprintk
(
dev
,
V4L2_DEBUG_QUEUE
,
"URB status %d [%s].
\n
"
,
status
,
errmsg
);
}
else
{
dprintk
(
dev
,
V4L2_DEBUG_QUEUE
,
"URB packet %d, status %d [%s].
\n
"
,
packet
,
status
,
errmsg
);
}
}
/*
* Controls the isoc copy of each urb packet
*/
...
...
@@ -344,42 +385,18 @@ static inline int tm6000_isoc_copy(struct urb *urb, struct tm6000_buffer **buf)
copied
=
0
;
if
(
urb
->
status
<
0
)
{
print_err_status
(
dev
,
-
1
,
urb
->
status
);
return
0
;
}
for
(
i
=
0
;
i
<
urb
->
number_of_packets
;
i
++
)
{
int
status
=
urb
->
iso_frame_desc
[
i
].
status
;
char
*
errmsg
=
"Unknown"
;
switch
(
status
)
{
case
-
ENOENT
:
errmsg
=
"unlinked synchronuously"
;
break
;
case
-
ECONNRESET
:
errmsg
=
"unlinked asynchronuously"
;
break
;
case
-
ENOSR
:
errmsg
=
"Buffer error (overrun)"
;
break
;
case
-
EPIPE
:
errmsg
=
"Stalled (device not responding)"
;
break
;
case
-
EOVERFLOW
:
errmsg
=
"Babble (bad cable?)"
;
break
;
case
-
EPROTO
:
errmsg
=
"Bit-stuff error (bad cable?)"
;
break
;
case
-
EILSEQ
:
errmsg
=
"CRC/Timeout (could be anything)"
;
break
;
case
-
ETIME
:
errmsg
=
"Device does not respond"
;
break
;
}
dprintk
(
dev
,
V4L2_DEBUG_QUEUE
,
"URB status %d [%s].
\n
"
,
status
,
errmsg
);
if
(
status
<
0
)
if
(
status
<
0
)
{
print_err_status
(
dev
,
i
,
status
);
continue
;
}
len
=
urb
->
iso_frame_desc
[
i
].
actual_length
;
...
...
@@ -402,7 +419,7 @@ static inline int tm6000_isoc_copy(struct urb *urb, struct tm6000_buffer **buf)
if
(((
*
buf
)
->
fmt
->
fourcc
)
!=
V4L2_PIX_FMT_TM6000
)
{
buffer_filled
(
dev
,
*
buf
);
dprintk
(
dev
,
V4L2_DEBUG_
QUEUE
,
"new buffer filled
\n
"
);
dprintk
(
dev
,
V4L2_DEBUG_
ISOC
,
"new buffer filled
\n
"
);
}
return
rc
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录