Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
35bb94b1
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看板
提交
35bb94b1
编写于
4月 11, 2006
作者:
J
Jeff Garzik
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
libata: Add helper ata_shost_to_port()
上级
381544bb
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
15 addition
and
9 deletion
+15
-9
drivers/scsi/libata-core.c
drivers/scsi/libata-core.c
+2
-2
drivers/scsi/libata-eh.c
drivers/scsi/libata-eh.c
+2
-2
drivers/scsi/libata-scsi.c
drivers/scsi/libata-scsi.c
+4
-4
drivers/scsi/sata_svw.c
drivers/scsi/sata_svw.c
+1
-1
include/linux/libata.h
include/linux/libata.h
+6
-0
未找到文件。
drivers/scsi/libata-core.c
浏览文件 @
35bb94b1
...
...
@@ -4659,7 +4659,7 @@ static struct ata_port * ata_host_add(const struct ata_probe_ent *ent,
host
->
transportt
=
&
ata_scsi_transport_template
;
ap
=
(
struct
ata_port
*
)
&
host
->
hostdata
[
0
]
;
ap
=
ata_shost_to_port
(
host
)
;
ata_host_init
(
ap
,
host
,
host_set
,
ent
,
port_no
);
...
...
@@ -4872,7 +4872,7 @@ void ata_host_set_remove(struct ata_host_set *host_set)
int
ata_scsi_release
(
struct
Scsi_Host
*
host
)
{
struct
ata_port
*
ap
=
(
struct
ata_port
*
)
&
host
->
hostdata
[
0
]
;
struct
ata_port
*
ap
=
ata_shost_to_port
(
host
)
;
int
i
;
DPRINTK
(
"ENTER
\n
"
);
...
...
drivers/scsi/libata-eh.c
浏览文件 @
35bb94b1
...
...
@@ -64,7 +64,7 @@
enum
scsi_eh_timer_return
ata_scsi_timed_out
(
struct
scsi_cmnd
*
cmd
)
{
struct
Scsi_Host
*
host
=
cmd
->
device
->
host
;
struct
ata_port
*
ap
=
(
struct
ata_port
*
)
&
host
->
hostdata
[
0
]
;
struct
ata_port
*
ap
=
ata_shost_to_port
(
host
)
;
unsigned
long
flags
;
struct
ata_queued_cmd
*
qc
;
enum
scsi_eh_timer_return
ret
=
EH_HANDLED
;
...
...
@@ -99,7 +99,7 @@ enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd)
*/
void
ata_scsi_error
(
struct
Scsi_Host
*
host
)
{
struct
ata_port
*
ap
=
(
struct
ata_port
*
)
&
host
->
hostdata
[
0
]
;
struct
ata_port
*
ap
=
ata_shost_to_port
(
host
)
;
DPRINTK
(
"ENTER
\n
"
);
...
...
drivers/scsi/libata-scsi.c
浏览文件 @
35bb94b1
...
...
@@ -395,7 +395,7 @@ void ata_dump_status(unsigned id, struct ata_taskfile *tf)
int
ata_scsi_device_resume
(
struct
scsi_device
*
sdev
)
{
struct
ata_port
*
ap
=
(
struct
ata_port
*
)
&
sdev
->
host
->
hostdata
[
0
]
;
struct
ata_port
*
ap
=
ata_shost_to_port
(
sdev
->
host
)
;
struct
ata_device
*
dev
=
&
ap
->
device
[
sdev
->
id
];
return
ata_device_resume
(
ap
,
dev
);
...
...
@@ -403,7 +403,7 @@ int ata_scsi_device_resume(struct scsi_device *sdev)
int
ata_scsi_device_suspend
(
struct
scsi_device
*
sdev
,
pm_message_t
state
)
{
struct
ata_port
*
ap
=
(
struct
ata_port
*
)
&
sdev
->
host
->
hostdata
[
0
]
;
struct
ata_port
*
ap
=
ata_shost_to_port
(
sdev
->
host
)
;
struct
ata_device
*
dev
=
&
ap
->
device
[
sdev
->
id
];
return
ata_device_suspend
(
ap
,
dev
,
state
);
...
...
@@ -704,7 +704,7 @@ int ata_scsi_slave_config(struct scsi_device *sdev)
struct
ata_port
*
ap
;
struct
ata_device
*
dev
;
ap
=
(
struct
ata_port
*
)
&
sdev
->
host
->
hostdata
[
0
]
;
ap
=
ata_shost_to_port
(
sdev
->
host
)
;
dev
=
&
ap
->
device
[
sdev
->
id
];
ata_scsi_dev_config
(
sdev
,
dev
);
...
...
@@ -2478,7 +2478,7 @@ int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
struct
scsi_device
*
scsidev
=
cmd
->
device
;
struct
Scsi_Host
*
shost
=
scsidev
->
host
;
ap
=
(
struct
ata_port
*
)
&
shost
->
hostdata
[
0
]
;
ap
=
ata_shost_to_port
(
shost
)
;
spin_unlock
(
shost
->
host_lock
);
spin_lock
(
&
ap
->
host_set
->
lock
);
...
...
drivers/scsi/sata_svw.c
浏览文件 @
35bb94b1
...
...
@@ -257,7 +257,7 @@ static int k2_sata_proc_info(struct Scsi_Host *shost, char *page, char **start,
int
len
,
index
;
/* Find the ata_port */
ap
=
(
struct
ata_port
*
)
&
shost
->
hostdata
[
0
]
;
ap
=
ata_shost_to_port
(
shost
)
;
if
(
ap
==
NULL
)
return
0
;
...
...
include/linux/libata.h
浏览文件 @
35bb94b1
...
...
@@ -33,6 +33,7 @@
#include <asm/io.h>
#include <linux/ata.h>
#include <linux/workqueue.h>
#include <scsi/scsi_host.h>
/*
* compile-time options: to be removed as soon as all the drivers are
...
...
@@ -977,4 +978,9 @@ static inline void ata_pad_free(struct ata_port *ap, struct device *dev)
dma_free_coherent
(
dev
,
ATA_DMA_PAD_BUF_SZ
,
ap
->
pad
,
ap
->
pad_dma
);
}
static
inline
struct
ata_port
*
ata_shost_to_port
(
struct
Scsi_Host
*
host
)
{
return
(
struct
ata_port
*
)
&
host
->
hostdata
[
0
];
}
#endif
/* __LINUX_LIBATA_H__ */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录