Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
cdbbde14
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cdbbde14
编写于
5月 26, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge of 'misc-fixes' branch from
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
上级
284e4238
32529e01
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
7 addition
and
6 deletion
+7
-6
drivers/scsi/libata-core.c
drivers/scsi/libata-core.c
+7
-6
未找到文件。
drivers/scsi/libata-core.c
浏览文件 @
cdbbde14
...
@@ -2071,7 +2071,7 @@ void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen)
...
@@ -2071,7 +2071,7 @@ void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen)
sg
=
qc
->
sg
;
sg
=
qc
->
sg
;
sg
->
page
=
virt_to_page
(
buf
);
sg
->
page
=
virt_to_page
(
buf
);
sg
->
offset
=
(
unsigned
long
)
buf
&
~
PAGE_MASK
;
sg
->
offset
=
(
unsigned
long
)
buf
&
~
PAGE_MASK
;
sg
_dma_len
(
sg
)
=
buflen
;
sg
->
length
=
buflen
;
}
}
void
ata_sg_init
(
struct
ata_queued_cmd
*
qc
,
struct
scatterlist
*
sg
,
void
ata_sg_init
(
struct
ata_queued_cmd
*
qc
,
struct
scatterlist
*
sg
,
...
@@ -2101,11 +2101,12 @@ static int ata_sg_setup_one(struct ata_queued_cmd *qc)
...
@@ -2101,11 +2101,12 @@ static int ata_sg_setup_one(struct ata_queued_cmd *qc)
dma_addr_t
dma_address
;
dma_addr_t
dma_address
;
dma_address
=
dma_map_single
(
ap
->
host_set
->
dev
,
qc
->
buf_virt
,
dma_address
=
dma_map_single
(
ap
->
host_set
->
dev
,
qc
->
buf_virt
,
sg
_dma_len
(
sg
)
,
dir
);
sg
->
length
,
dir
);
if
(
dma_mapping_error
(
dma_address
))
if
(
dma_mapping_error
(
dma_address
))
return
-
1
;
return
-
1
;
sg_dma_address
(
sg
)
=
dma_address
;
sg_dma_address
(
sg
)
=
dma_address
;
sg_dma_len
(
sg
)
=
sg
->
length
;
DPRINTK
(
"mapped buffer of %d bytes for %s
\n
"
,
sg_dma_len
(
sg
),
DPRINTK
(
"mapped buffer of %d bytes for %s
\n
"
,
sg_dma_len
(
sg
),
qc
->
tf
.
flags
&
ATA_TFLAG_WRITE
?
"write"
:
"read"
);
qc
->
tf
.
flags
&
ATA_TFLAG_WRITE
?
"write"
:
"read"
);
...
@@ -2310,7 +2311,7 @@ static void ata_pio_sector(struct ata_queued_cmd *qc)
...
@@ -2310,7 +2311,7 @@ static void ata_pio_sector(struct ata_queued_cmd *qc)
qc
->
cursect
++
;
qc
->
cursect
++
;
qc
->
cursg_ofs
++
;
qc
->
cursg_ofs
++
;
if
((
qc
->
cursg_ofs
*
ATA_SECT_SIZE
)
==
sg_dma_len
(
&
sg
[
qc
->
cursg
])
)
{
if
((
qc
->
cursg_ofs
*
ATA_SECT_SIZE
)
==
(
&
sg
[
qc
->
cursg
])
->
length
)
{
qc
->
cursg
++
;
qc
->
cursg
++
;
qc
->
cursg_ofs
=
0
;
qc
->
cursg_ofs
=
0
;
}
}
...
@@ -2347,7 +2348,7 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes)
...
@@ -2347,7 +2348,7 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes)
page
=
nth_page
(
page
,
(
offset
>>
PAGE_SHIFT
));
page
=
nth_page
(
page
,
(
offset
>>
PAGE_SHIFT
));
offset
%=
PAGE_SIZE
;
offset
%=
PAGE_SIZE
;
count
=
min
(
sg
_dma_len
(
sg
)
-
qc
->
cursg_ofs
,
bytes
);
count
=
min
(
sg
->
length
-
qc
->
cursg_ofs
,
bytes
);
/* don't cross page boundaries */
/* don't cross page boundaries */
count
=
min
(
count
,
(
unsigned
int
)
PAGE_SIZE
-
offset
);
count
=
min
(
count
,
(
unsigned
int
)
PAGE_SIZE
-
offset
);
...
@@ -2358,7 +2359,7 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes)
...
@@ -2358,7 +2359,7 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes)
qc
->
curbytes
+=
count
;
qc
->
curbytes
+=
count
;
qc
->
cursg_ofs
+=
count
;
qc
->
cursg_ofs
+=
count
;
if
(
qc
->
cursg_ofs
==
sg
_dma_len
(
sg
)
)
{
if
(
qc
->
cursg_ofs
==
sg
->
length
)
{
qc
->
cursg
++
;
qc
->
cursg
++
;
qc
->
cursg_ofs
=
0
;
qc
->
cursg_ofs
=
0
;
}
}
...
@@ -2371,7 +2372,7 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes)
...
@@ -2371,7 +2372,7 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes)
kunmap
(
page
);
kunmap
(
page
);
if
(
bytes
)
{
if
(
bytes
)
{
if
(
qc
->
cursg_ofs
<
sg
_dma_len
(
sg
)
)
if
(
qc
->
cursg_ofs
<
sg
->
length
)
goto
next_page
;
goto
next_page
;
goto
next_sg
;
goto
next_sg
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录