Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
6da34a8d
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6da34a8d
编写于
9月 16, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
上级
53abbf7e
7fb6ec28
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
23 addition
and
14 deletion
+23
-14
drivers/scsi/libata-core.c
drivers/scsi/libata-core.c
+23
-14
未找到文件。
drivers/scsi/libata-core.c
浏览文件 @
6da34a8d
...
...
@@ -2465,9 +2465,12 @@ static unsigned long ata_pio_poll(struct ata_port *ap)
*
* LOCKING:
* None. (executing in kernel thread context)
*
* RETURNS:
* Non-zero if qc completed, zero otherwise.
*/
static
void
ata_pio_complete
(
struct
ata_port
*
ap
)
static
int
ata_pio_complete
(
struct
ata_port
*
ap
)
{
struct
ata_queued_cmd
*
qc
;
u8
drv_stat
;
...
...
@@ -2486,14 +2489,14 @@ static void ata_pio_complete (struct ata_port *ap)
if
(
drv_stat
&
(
ATA_BUSY
|
ATA_DRQ
))
{
ap
->
pio_task_state
=
PIO_ST_LAST_POLL
;
ap
->
pio_task_timeout
=
jiffies
+
ATA_TMOUT_PIO
;
return
;
return
0
;
}
}
drv_stat
=
ata_wait_idle
(
ap
);
if
(
!
ata_ok
(
drv_stat
))
{
ap
->
pio_task_state
=
PIO_ST_ERR
;
return
;
return
0
;
}
qc
=
ata_qc_from_tag
(
ap
,
ap
->
active_tag
);
...
...
@@ -2502,6 +2505,10 @@ static void ata_pio_complete (struct ata_port *ap)
ap
->
pio_task_state
=
PIO_ST_IDLE
;
ata_poll_qc_complete
(
qc
,
drv_stat
);
/* another command may start at this point */
return
1
;
}
...
...
@@ -2709,7 +2716,7 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes)
next_sg:
if
(
unlikely
(
qc
->
cursg
>=
qc
->
n_elem
))
{
/*
/*
* The end of qc->sg is reached and the device expects
* more data to transfer. In order not to overrun qc->sg
* and fulfill length specified in the byte count register,
...
...
@@ -2721,7 +2728,7 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes)
unsigned
int
i
;
if
(
words
)
/* warning if bytes > 1 */
printk
(
KERN_WARNING
"ata%u: %u bytes trailing data
\n
"
,
printk
(
KERN_WARNING
"ata%u: %u bytes trailing data
\n
"
,
ap
->
id
,
bytes
);
for
(
i
=
0
;
i
<
words
;
i
++
)
...
...
@@ -2849,9 +2856,7 @@ static void ata_pio_block(struct ata_port *ap)
if
(
is_atapi_taskfile
(
&
qc
->
tf
))
{
/* no more data to transfer or unsupported ATAPI command */
if
((
status
&
ATA_DRQ
)
==
0
)
{
ap
->
pio_task_state
=
PIO_ST_IDLE
;
ata_poll_qc_complete
(
qc
,
status
);
ap
->
pio_task_state
=
PIO_ST_LAST
;
return
;
}
...
...
@@ -2887,7 +2892,12 @@ static void ata_pio_error(struct ata_port *ap)
static
void
ata_pio_task
(
void
*
_data
)
{
struct
ata_port
*
ap
=
_data
;
unsigned
long
timeout
=
0
;
unsigned
long
timeout
;
int
qc_completed
;
fsm_start:
timeout
=
0
;
qc_completed
=
0
;
switch
(
ap
->
pio_task_state
)
{
case
PIO_ST_IDLE
:
...
...
@@ -2898,7 +2908,7 @@ static void ata_pio_task(void *_data)
break
;
case
PIO_ST_LAST
:
ata_pio_complete
(
ap
);
qc_completed
=
ata_pio_complete
(
ap
);
break
;
case
PIO_ST_POLL
:
...
...
@@ -2913,10 +2923,9 @@ static void ata_pio_task(void *_data)
}
if
(
timeout
)
queue_delayed_work
(
ata_wq
,
&
ap
->
pio_task
,
timeout
);
else
queue_work
(
ata_wq
,
&
ap
->
pio_task
);
queue_delayed_work
(
ata_wq
,
&
ap
->
pio_task
,
timeout
);
else
if
(
!
qc_completed
)
goto
fsm_start
;
}
static
void
atapi_request_sense
(
struct
ata_port
*
ap
,
struct
ata_device
*
dev
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录