Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
f89b2b5d
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f89b2b5d
编写于
8月 22, 2006
作者:
J
Jeff Garzik
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'upstream-fixes' into upstream
Conflicts: drivers/ata/ata_piix.c
上级
77967052
f1a58eca
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
43 addition
and
17 deletion
+43
-17
drivers/ata/ata_piix.c
drivers/ata/ata_piix.c
+43
-17
未找到文件。
drivers/ata/ata_piix.c
浏览文件 @
f89b2b5d
...
...
@@ -531,27 +531,25 @@ static void piix_pata_error_handler(struct ata_port *ap)
}
/**
* piix_sata_pre
reset - prereset
for SATA host controller
* piix_sata_pre
sent_mask - determine present mask
for SATA host controller
* @ap: Target port
*
* Reads and configures SATA PCI device's PCI config register
* Port Configuration and Status (PCS) to determine port and
* device availability. Return -ENODEV to skip reset if no
* device is present.
* Reads SATA PCI device's PCI config register Port Configuration
* and Status (PCS) to determine port and device availability.
*
* LOCKING:
* None (inherited from caller).
*
* RETURNS:
*
0 if device is present, -ENODEV otherwise.
*
determined present_mask
*/
static
int
piix_sata_prereset
(
struct
ata_port
*
ap
)
static
unsigned
int
piix_sata_present_mask
(
struct
ata_port
*
ap
)
{
struct
pci_dev
*
pdev
=
to_pci_dev
(
ap
->
host_set
->
dev
);
struct
piix_host_priv
*
hpriv
=
ap
->
host_set
->
private_data
;
const
unsigned
int
*
map
=
hpriv
->
map
;
int
base
=
2
*
ap
->
port_no
;
unsigned
int
present
=
0
;
unsigned
int
present
_mask
=
0
;
int
port
,
i
;
u16
pcs
;
...
...
@@ -564,24 +562,52 @@ static int piix_sata_prereset(struct ata_port *ap)
continue
;
if
((
ap
->
flags
&
PIIX_FLAG_IGNORE_PCS
)
||
(
pcs
&
1
<<
(
hpriv
->
map_db
->
present_shift
+
port
)))
present
=
1
;
present
_mask
|=
1
<<
i
;
}
DPRINTK
(
"ata%u: LEAVE, pcs=0x%x present=0x%x
\n
"
,
ap
->
id
,
pcs
,
present
);
DPRINTK
(
"ata%u: LEAVE, pcs=0x%x present
_mask
=0x%x
\n
"
,
ap
->
id
,
pcs
,
present
_mask
);
if
(
!
present
)
{
ata_port_printk
(
ap
,
KERN_INFO
,
"SATA port has no device.
\n
"
);
ap
->
eh_context
.
i
.
action
&=
~
ATA_EH_RESET_MASK
;
return
0
;
return
present_mask
;
}
/**
* piix_sata_softreset - reset SATA host port via ATA SRST
* @ap: port to reset
* @classes: resulting classes of attached devices
*
* Reset SATA host port via ATA SRST. On controllers with
* reliable PCS present bits, the bits are used to determine
* device presence.
*
* LOCKING:
* Kernel thread context (may sleep)
*
* RETURNS:
* 0 on success, -errno otherwise.
*/
static
int
piix_sata_softreset
(
struct
ata_port
*
ap
,
unsigned
int
*
classes
)
{
unsigned
int
present_mask
;
int
i
,
rc
;
present_mask
=
piix_sata_present_mask
(
ap
);
rc
=
ata_std_softreset
(
ap
,
classes
);
if
(
rc
)
return
rc
;
for
(
i
=
0
;
i
<
ATA_MAX_DEVICES
;
i
++
)
{
if
(
!
(
present_mask
&
(
1
<<
i
)))
classes
[
i
]
=
ATA_DEV_NONE
;
}
return
ata_std_prereset
(
ap
)
;
return
0
;
}
static
void
piix_sata_error_handler
(
struct
ata_port
*
ap
)
{
ata_bmdma_drive_eh
(
ap
,
piix_sata_prereset
,
ata_std
_softreset
,
NULL
,
ata_bmdma_drive_eh
(
ap
,
ata_std_prereset
,
piix_sata
_softreset
,
NULL
,
ata_std_postreset
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录