Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
_Walt
cloud-kernel
提交
48d28fd5
cloud-kernel
项目概览
_Walt
/
cloud-kernel
与 Fork 源项目一致
Fork自
openanolis / cloud-kernel
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
48d28fd5
编写于
8月 10, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
上级
86b37860
5bb8345d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
50 addition
and
2 deletion
+50
-2
drivers/scsi/dpt_i2o.c
drivers/scsi/dpt_i2o.c
+8
-1
drivers/scsi/scsi_scan.c
drivers/scsi/scsi_scan.c
+15
-1
drivers/scsi/scsi_transport_fc.c
drivers/scsi/scsi_transport_fc.c
+19
-0
include/scsi/scsi_transport.h
include/scsi/scsi_transport.h
+8
-0
未找到文件。
drivers/scsi/dpt_i2o.c
浏览文件 @
48d28fd5
...
...
@@ -907,9 +907,13 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
raptorFlag
=
TRUE
;
}
if
(
pci_request_regions
(
pDev
,
"dpt_i2o"
))
{
PERROR
(
"dpti: adpt_config_hba: pci request region failed
\n
"
);
return
-
EINVAL
;
}
base_addr_virt
=
ioremap
(
base_addr0_phys
,
hba_map0_area_size
);
if
(
!
base_addr_virt
)
{
pci_release_regions
(
pDev
);
PERROR
(
"dpti: adpt_config_hba: io remap failed
\n
"
);
return
-
EINVAL
;
}
...
...
@@ -919,6 +923,7 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
if
(
!
msg_addr_virt
)
{
PERROR
(
"dpti: adpt_config_hba: io remap failed on BAR1
\n
"
);
iounmap
(
base_addr_virt
);
pci_release_regions
(
pDev
);
return
-
EINVAL
;
}
}
else
{
...
...
@@ -932,6 +937,7 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
iounmap
(
msg_addr_virt
);
}
iounmap
(
base_addr_virt
);
pci_release_regions
(
pDev
);
return
-
ENOMEM
;
}
memset
(
pHba
,
0
,
sizeof
(
adpt_hba
));
...
...
@@ -1027,6 +1033,7 @@ static void adpt_i2o_delete_hba(adpt_hba* pHba)
up
(
&
adpt_configuration_lock
);
iounmap
(
pHba
->
base_addr_virt
);
pci_release_regions
(
pHba
->
pDev
);
if
(
pHba
->
msg_addr_virt
!=
pHba
->
base_addr_virt
){
iounmap
(
pHba
->
msg_addr_virt
);
}
...
...
drivers/scsi/scsi_scan.c
浏览文件 @
48d28fd5
...
...
@@ -336,9 +336,23 @@ static struct scsi_target *scsi_alloc_target(struct device *parent,
unsigned
long
flags
;
const
int
size
=
sizeof
(
struct
scsi_target
)
+
shost
->
transportt
->
target_size
;
struct
scsi_target
*
starget
=
kmalloc
(
size
,
GFP_ATOMIC
)
;
struct
scsi_target
*
starget
;
struct
scsi_target
*
found_target
;
/*
* Obtain the real parent from the transport. The transport
* is allowed to fail (no error) if there is nothing at that
* target id.
*/
if
(
shost
->
transportt
->
target_parent
)
{
spin_lock_irqsave
(
shost
->
host_lock
,
flags
);
parent
=
shost
->
transportt
->
target_parent
(
shost
,
channel
,
id
);
spin_unlock_irqrestore
(
shost
->
host_lock
,
flags
);
if
(
!
parent
)
return
NULL
;
}
starget
=
kmalloc
(
size
,
GFP_KERNEL
);
if
(
!
starget
)
{
printk
(
KERN_ERR
"%s: allocation failure
\n
"
,
__FUNCTION__
);
return
NULL
;
...
...
drivers/scsi/scsi_transport_fc.c
浏览文件 @
48d28fd5
...
...
@@ -1022,6 +1022,23 @@ static int fc_rport_match(struct attribute_container *cont,
return
&
i
->
rport_attr_cont
.
ac
==
cont
;
}
/*
* Must be called with shost->host_lock held
*/
static
struct
device
*
fc_target_parent
(
struct
Scsi_Host
*
shost
,
int
channel
,
uint
id
)
{
struct
fc_rport
*
rport
;
list_for_each_entry
(
rport
,
&
fc_host_rports
(
shost
),
peers
)
if
((
rport
->
channel
==
channel
)
&&
(
rport
->
scsi_target_id
==
id
))
return
&
rport
->
dev
;
return
NULL
;
}
struct
scsi_transport_template
*
fc_attach_transport
(
struct
fc_function_template
*
ft
)
{
...
...
@@ -1057,6 +1074,8 @@ fc_attach_transport(struct fc_function_template *ft)
/* Transport uses the shost workq for scsi scanning */
i
->
t
.
create_work_queue
=
1
;
i
->
t
.
target_parent
=
fc_target_parent
;
/*
* Setup SCSI Target Attributes.
...
...
include/scsi/scsi_transport.h
浏览文件 @
48d28fd5
...
...
@@ -29,6 +29,14 @@ struct scsi_transport_template {
struct
transport_container
target_attrs
;
struct
transport_container
device_attrs
;
/*
* If set, call target_parent prior to allocating a scsi_target,
* so we get the appropriate parent for the target. This function
* is required for transports like FC and iSCSI that do not put the
* scsi_target under scsi_host.
*/
struct
device
*
(
*
target_parent
)(
struct
Scsi_Host
*
,
int
,
uint
);
/* The size of the specific transport attribute structure (a
* space of this size will be left at the end of the
* scsi_* structure */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录