Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
a9925a06
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,发现更多精彩内容 >>
提交
a9925a06
编写于
1月 09, 2006
作者:
J
Jens Axboe
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[BLOCK] CCISS: update for blk softirq completions
Signed-off-by:
N
Jens Axboe
<
axboe@suse.de
>
上级
8672d571
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
46 addition
and
26 deletion
+46
-26
drivers/block/cciss.c
drivers/block/cciss.c
+46
-26
未找到文件。
drivers/block/cciss.c
浏览文件 @
a9925a06
...
...
@@ -2178,16 +2178,48 @@ static inline void resend_cciss_cmd( ctlr_info_t *h, CommandList_struct *c)
start_io
(
h
);
}
static
void
cciss_softirq_done
(
struct
request
*
rq
)
{
CommandList_struct
*
cmd
=
rq
->
completion_data
;
ctlr_info_t
*
h
=
hba
[
cmd
->
ctlr
];
u64bit
temp64
;
int
i
,
ddir
;
if
(
cmd
->
Request
.
Type
.
Direction
==
XFER_READ
)
ddir
=
PCI_DMA_FROMDEVICE
;
else
ddir
=
PCI_DMA_TODEVICE
;
/* command did not need to be retried */
/* unmap the DMA mapping for all the scatter gather elements */
for
(
i
=
0
;
i
<
cmd
->
Header
.
SGList
;
i
++
)
{
temp64
.
val32
.
lower
=
cmd
->
SG
[
i
].
Addr
.
lower
;
temp64
.
val32
.
upper
=
cmd
->
SG
[
i
].
Addr
.
upper
;
pci_unmap_page
(
h
->
pdev
,
temp64
.
val
,
cmd
->
SG
[
i
].
Len
,
ddir
);
}
complete_buffers
(
rq
->
bio
,
rq
->
errors
);
#ifdef CCISS_DEBUG
printk
(
"Done with %p
\n
"
,
rq
);
#endif
/* CCISS_DEBUG */
spin_lock_irq
(
&
h
->
lock
);
end_that_request_last
(
rq
,
rq
->
errors
);
cmd_free
(
h
,
cmd
,
1
);
spin_unlock_irq
(
&
h
->
lock
);
}
/* checks the status of the job and calls complete buffers to mark all
* buffers for the completed job.
* buffers for the completed job. Note that this function does not need
* to hold the hba/queue lock.
*/
static
inline
void
complete_command
(
ctlr_info_t
*
h
,
CommandList_struct
*
cmd
,
int
timeout
)
{
int
status
=
1
;
int
i
;
int
retry_cmd
=
0
;
u64bit
temp64
;
if
(
timeout
)
status
=
0
;
...
...
@@ -2295,24 +2327,10 @@ static inline void complete_command( ctlr_info_t *h, CommandList_struct *cmd,
resend_cciss_cmd
(
h
,
cmd
);
return
;
}
/* command did not need to be retried */
/* unmap the DMA mapping for all the scatter gather elements */
for
(
i
=
0
;
i
<
cmd
->
Header
.
SGList
;
i
++
)
{
temp64
.
val32
.
lower
=
cmd
->
SG
[
i
].
Addr
.
lower
;
temp64
.
val32
.
upper
=
cmd
->
SG
[
i
].
Addr
.
upper
;
pci_unmap_page
(
hba
[
cmd
->
ctlr
]
->
pdev
,
temp64
.
val
,
cmd
->
SG
[
i
].
Len
,
(
cmd
->
Request
.
Type
.
Direction
==
XFER_READ
)
?
PCI_DMA_FROMDEVICE
:
PCI_DMA_TODEVICE
);
}
complete_buffers
(
cmd
->
rq
->
bio
,
status
);
#ifdef CCISS_DEBUG
printk
(
"Done with %p
\n
"
,
cmd
->
rq
);
#endif
/* CCISS_DEBUG */
end_that_request_last
(
cmd
->
rq
,
status
?
1
:
-
EIO
);
cmd_free
(
h
,
cmd
,
1
);
cmd
->
rq
->
completion_data
=
cmd
;
cmd
->
rq
->
errors
=
status
;
blk_complete_request
(
cmd
->
rq
);
}
/*
...
...
@@ -3199,15 +3217,17 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
drv
->
queue
=
q
;
q
->
backing_dev_info
.
ra_pages
=
READ_AHEAD
;
blk_queue_bounce_limit
(
q
,
hba
[
i
]
->
pdev
->
dma_mask
);
blk_queue_bounce_limit
(
q
,
hba
[
i
]
->
pdev
->
dma_mask
);
/* This is a hardware imposed limit. */
blk_queue_max_hw_segments
(
q
,
MAXSGENTRIES
);
/* This is a hardware imposed limit
. */
blk_queue_max_hw
_segments
(
q
,
MAXSGENTRIES
);
/* This is a limit in the driver and could be eliminated
. */
blk_queue_max_phys
_segments
(
q
,
MAXSGENTRIES
);
/* This is a limit in the driver and could be eliminated. */
blk_queue_max_phys_segments
(
q
,
MAXSGENTRIES
);
blk_queue_max_sectors
(
q
,
512
);
blk_queue_max_sectors
(
q
,
512
);
blk_queue_softirq_done
(
q
,
cciss_softirq_done
);
q
->
queuedata
=
hba
[
i
];
sprintf
(
disk
->
disk_name
,
"cciss/c%dd%d"
,
i
,
j
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录