Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
ae5684ce
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看板
提交
ae5684ce
编写于
11月 12, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
上级
0fde7f59
02eaa666
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
33 addition
and
8 deletion
+33
-8
drivers/scsi/ahci.c
drivers/scsi/ahci.c
+27
-5
drivers/scsi/sata_qstor.c
drivers/scsi/sata_qstor.c
+6
-3
未找到文件。
drivers/scsi/ahci.c
浏览文件 @
ae5684ce
...
...
@@ -134,6 +134,7 @@ enum {
PORT_IRQ_D2H_REG_FIS
,
/* PORT_CMD bits */
PORT_CMD_ATAPI
=
(
1
<<
24
),
/* Device is ATAPI */
PORT_CMD_LIST_ON
=
(
1
<<
15
),
/* cmd list DMA engine running */
PORT_CMD_FIS_ON
=
(
1
<<
14
),
/* FIS DMA engine running */
PORT_CMD_FIS_RX
=
(
1
<<
4
),
/* Enable FIS receive DMA engine */
...
...
@@ -441,7 +442,7 @@ static void ahci_phy_reset(struct ata_port *ap)
void
__iomem
*
port_mmio
=
(
void
__iomem
*
)
ap
->
ioaddr
.
cmd_addr
;
struct
ata_taskfile
tf
;
struct
ata_device
*
dev
=
&
ap
->
device
[
0
];
u32
tmp
;
u32
new_tmp
,
tmp
;
__sata_phy_reset
(
ap
);
...
...
@@ -455,8 +456,21 @@ static void ahci_phy_reset(struct ata_port *ap)
tf
.
nsect
=
(
tmp
)
&
0xff
;
dev
->
class
=
ata_dev_classify
(
&
tf
);
if
(
!
ata_dev_present
(
dev
))
if
(
!
ata_dev_present
(
dev
))
{
ata_port_disable
(
ap
);
return
;
}
/* Make sure port's ATAPI bit is set appropriately */
new_tmp
=
tmp
=
readl
(
port_mmio
+
PORT_CMD
);
if
(
dev
->
class
==
ATA_DEV_ATAPI
)
new_tmp
|=
PORT_CMD_ATAPI
;
else
new_tmp
&=
~
PORT_CMD_ATAPI
;
if
(
new_tmp
!=
tmp
)
{
writel
(
new_tmp
,
port_mmio
+
PORT_CMD
);
readl
(
port_mmio
+
PORT_CMD
);
/* flush */
}
}
static
u8
ahci_check_status
(
struct
ata_port
*
ap
)
...
...
@@ -474,11 +488,12 @@ static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
ata_tf_from_fis
(
d2h_fis
,
tf
);
}
static
void
ahci_fill_sg
(
struct
ata_queued_cmd
*
qc
)
static
unsigned
int
ahci_fill_sg
(
struct
ata_queued_cmd
*
qc
)
{
struct
ahci_port_priv
*
pp
=
qc
->
ap
->
private_data
;
struct
scatterlist
*
sg
;
struct
ahci_sg
*
ahci_sg
;
unsigned
int
n_sg
=
0
;
VPRINTK
(
"ENTER
\n
"
);
...
...
@@ -493,8 +508,12 @@ static void ahci_fill_sg(struct ata_queued_cmd *qc)
ahci_sg
->
addr
=
cpu_to_le32
(
addr
&
0xffffffff
);
ahci_sg
->
addr_hi
=
cpu_to_le32
((
addr
>>
16
)
>>
16
);
ahci_sg
->
flags_size
=
cpu_to_le32
(
sg_len
-
1
);
ahci_sg
++
;
n_sg
++
;
}
return
n_sg
;
}
static
void
ahci_qc_prep
(
struct
ata_queued_cmd
*
qc
)
...
...
@@ -503,13 +522,14 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc)
struct
ahci_port_priv
*
pp
=
ap
->
private_data
;
u32
opts
;
const
u32
cmd_fis_len
=
5
;
/* five dwords */
unsigned
int
n_elem
;
/*
* Fill in command slot information (currently only one slot,
* slot 0, is currently since we don't do queueing)
*/
opts
=
(
qc
->
n_elem
<<
16
)
|
cmd_fis_len
;
opts
=
cmd_fis_len
;
if
(
qc
->
tf
.
flags
&
ATA_TFLAG_WRITE
)
opts
|=
AHCI_CMD_WRITE
;
if
(
is_atapi_taskfile
(
&
qc
->
tf
))
...
...
@@ -533,7 +553,9 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc)
if
(
!
(
qc
->
flags
&
ATA_QCFLAG_DMAMAP
))
return
;
ahci_fill_sg
(
qc
);
n_elem
=
ahci_fill_sg
(
qc
);
pp
->
cmd_slot
[
0
].
opts
|=
cpu_to_le32
(
n_elem
<<
16
);
}
static
void
ahci_intr_error
(
struct
ata_port
*
ap
,
u32
irq_stat
)
...
...
drivers/scsi/sata_qstor.c
浏览文件 @
ae5684ce
...
...
@@ -268,7 +268,7 @@ static void qs_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val)
writel
(
val
,
(
void
__iomem
*
)(
ap
->
ioaddr
.
scr_addr
+
(
sc_reg
*
8
)));
}
static
void
qs_fill_sg
(
struct
ata_queued_cmd
*
qc
)
static
unsigned
int
qs_fill_sg
(
struct
ata_queued_cmd
*
qc
)
{
struct
scatterlist
*
sg
;
struct
ata_port
*
ap
=
qc
->
ap
;
...
...
@@ -296,6 +296,8 @@ static void qs_fill_sg(struct ata_queued_cmd *qc)
(
unsigned
long
long
)
addr
,
len
);
nelem
++
;
}
return
nelem
;
}
static
void
qs_qc_prep
(
struct
ata_queued_cmd
*
qc
)
...
...
@@ -304,6 +306,7 @@ static void qs_qc_prep(struct ata_queued_cmd *qc)
u8
dflags
=
QS_DF_PORD
,
*
buf
=
pp
->
pkt
;
u8
hflags
=
QS_HF_DAT
|
QS_HF_IEN
|
QS_HF_VLD
;
u64
addr
;
unsigned
int
nelem
;
VPRINTK
(
"ENTER
\n
"
);
...
...
@@ -313,7 +316,7 @@ static void qs_qc_prep(struct ata_queued_cmd *qc)
return
;
}
qs_fill_sg
(
qc
);
nelem
=
qs_fill_sg
(
qc
);
if
((
qc
->
tf
.
flags
&
ATA_TFLAG_WRITE
))
hflags
|=
QS_HF_DIRO
;
...
...
@@ -324,7 +327,7 @@ static void qs_qc_prep(struct ata_queued_cmd *qc)
buf
[
0
]
=
QS_HCB_HDR
;
buf
[
1
]
=
hflags
;
*
(
__le32
*
)(
&
buf
[
4
])
=
cpu_to_le32
(
qc
->
nsect
*
ATA_SECT_SIZE
);
*
(
__le32
*
)(
&
buf
[
8
])
=
cpu_to_le32
(
qc
->
n_
elem
);
*
(
__le32
*
)(
&
buf
[
8
])
=
cpu_to_le32
(
n
elem
);
addr
=
((
u64
)
pp
->
pkt_dma
)
+
QS_CPB_BYTES
;
*
(
__le64
*
)(
&
buf
[
16
])
=
cpu_to_le64
(
addr
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录