Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
0bc202e0
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0bc202e0
编写于
5月 24, 2008
作者:
D
David Woodhouse
提交者:
David Woodhouse
7月 10, 2008
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
aic94xx: treat firmware data as const
Signed-off-by:
N
David Woodhouse
<
dwmw2@infradead.org
>
上级
3b216d18
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
11 deletion
+12
-11
drivers/scsi/aic94xx/aic94xx_sds.c
drivers/scsi/aic94xx/aic94xx_sds.c
+6
-6
drivers/scsi/aic94xx/aic94xx_sds.h
drivers/scsi/aic94xx/aic94xx_sds.h
+2
-2
drivers/scsi/aic94xx/aic94xx_seq.c
drivers/scsi/aic94xx/aic94xx_seq.c
+4
-3
未找到文件。
drivers/scsi/aic94xx/aic94xx_sds.c
浏览文件 @
0bc202e0
...
@@ -1093,9 +1093,9 @@ int asd_read_flash(struct asd_ha_struct *asd_ha)
...
@@ -1093,9 +1093,9 @@ int asd_read_flash(struct asd_ha_struct *asd_ha)
* @bytes_to_verify: total bytes to verify
* @bytes_to_verify: total bytes to verify
*/
*/
int
asd_verify_flash_seg
(
struct
asd_ha_struct
*
asd_ha
,
int
asd_verify_flash_seg
(
struct
asd_ha_struct
*
asd_ha
,
void
*
src
,
u32
dest_offset
,
u32
bytes_to_verify
)
const
void
*
src
,
u32
dest_offset
,
u32
bytes_to_verify
)
{
{
u8
*
src_buf
;
const
u8
*
src_buf
;
u8
flash_char
;
u8
flash_char
;
int
err
;
int
err
;
u32
nv_offset
,
reg
,
i
;
u32
nv_offset
,
reg
,
i
;
...
@@ -1105,7 +1105,7 @@ int asd_verify_flash_seg(struct asd_ha_struct *asd_ha,
...
@@ -1105,7 +1105,7 @@ int asd_verify_flash_seg(struct asd_ha_struct *asd_ha,
err
=
FLASH_OK
;
err
=
FLASH_OK
;
nv_offset
=
dest_offset
;
nv_offset
=
dest_offset
;
src_buf
=
(
u8
*
)
src
;
src_buf
=
(
const
u8
*
)
src
;
for
(
i
=
0
;
i
<
bytes_to_verify
;
i
++
)
{
for
(
i
=
0
;
i
<
bytes_to_verify
;
i
++
)
{
flash_char
=
asd_read_reg_byte
(
asd_ha
,
reg
+
nv_offset
+
i
);
flash_char
=
asd_read_reg_byte
(
asd_ha
,
reg
+
nv_offset
+
i
);
if
(
flash_char
!=
src_buf
[
i
])
{
if
(
flash_char
!=
src_buf
[
i
])
{
...
@@ -1124,9 +1124,9 @@ int asd_verify_flash_seg(struct asd_ha_struct *asd_ha,
...
@@ -1124,9 +1124,9 @@ int asd_verify_flash_seg(struct asd_ha_struct *asd_ha,
* @bytes_to_write: total bytes to write
* @bytes_to_write: total bytes to write
*/
*/
int
asd_write_flash_seg
(
struct
asd_ha_struct
*
asd_ha
,
int
asd_write_flash_seg
(
struct
asd_ha_struct
*
asd_ha
,
void
*
src
,
u32
dest_offset
,
u32
bytes_to_write
)
const
void
*
src
,
u32
dest_offset
,
u32
bytes_to_write
)
{
{
u8
*
src_buf
;
const
u8
*
src_buf
;
u32
nv_offset
,
reg
,
i
;
u32
nv_offset
,
reg
,
i
;
int
err
;
int
err
;
...
@@ -1153,7 +1153,7 @@ int asd_write_flash_seg(struct asd_ha_struct *asd_ha,
...
@@ -1153,7 +1153,7 @@ int asd_write_flash_seg(struct asd_ha_struct *asd_ha,
return
err
;
return
err
;
}
}
src_buf
=
(
u8
*
)
src
;
src_buf
=
(
const
u8
*
)
src
;
for
(
i
=
0
;
i
<
bytes_to_write
;
i
++
)
{
for
(
i
=
0
;
i
<
bytes_to_write
;
i
++
)
{
/* Setup program command sequence */
/* Setup program command sequence */
switch
(
asd_ha
->
hw_prof
.
flash
.
method
)
{
switch
(
asd_ha
->
hw_prof
.
flash
.
method
)
{
...
...
drivers/scsi/aic94xx/aic94xx_sds.h
浏览文件 @
0bc202e0
...
@@ -110,9 +110,9 @@ struct bios_file_header {
...
@@ -110,9 +110,9 @@ struct bios_file_header {
};
};
int
asd_verify_flash_seg
(
struct
asd_ha_struct
*
asd_ha
,
int
asd_verify_flash_seg
(
struct
asd_ha_struct
*
asd_ha
,
void
*
src
,
u32
dest_offset
,
u32
bytes_to_verify
);
const
void
*
src
,
u32
dest_offset
,
u32
bytes_to_verify
);
int
asd_write_flash_seg
(
struct
asd_ha_struct
*
asd_ha
,
int
asd_write_flash_seg
(
struct
asd_ha_struct
*
asd_ha
,
void
*
src
,
u32
dest_offset
,
u32
bytes_to_write
);
const
void
*
src
,
u32
dest_offset
,
u32
bytes_to_write
);
int
asd_chk_write_status
(
struct
asd_ha_struct
*
asd_ha
,
int
asd_chk_write_status
(
struct
asd_ha_struct
*
asd_ha
,
u32
sector_addr
,
u8
erase_flag
);
u32
sector_addr
,
u8
erase_flag
);
int
asd_check_flash_type
(
struct
asd_ha_struct
*
asd_ha
);
int
asd_check_flash_type
(
struct
asd_ha_struct
*
asd_ha
);
...
...
drivers/scsi/aic94xx/aic94xx_seq.c
浏览文件 @
0bc202e0
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
static
const
struct
firmware
*
sequencer_fw
;
static
const
struct
firmware
*
sequencer_fw
;
static
u16
cseq_vecs
[
CSEQ_NUM_VECS
],
lseq_vecs
[
LSEQ_NUM_VECS
],
mode2_task
,
static
u16
cseq_vecs
[
CSEQ_NUM_VECS
],
lseq_vecs
[
LSEQ_NUM_VECS
],
mode2_task
,
cseq_idle_loop
,
lseq_idle_loop
;
cseq_idle_loop
,
lseq_idle_loop
;
static
u8
*
cseq_code
,
*
lseq_code
;
static
const
u8
*
cseq_code
,
*
lseq_code
;
static
u32
cseq_code_size
,
lseq_code_size
;
static
u32
cseq_code_size
,
lseq_code_size
;
static
u16
first_scb_site_no
=
0xFFFF
;
static
u16
first_scb_site_no
=
0xFFFF
;
...
@@ -1235,7 +1235,8 @@ int asd_release_firmware(void)
...
@@ -1235,7 +1235,8 @@ int asd_release_firmware(void)
static
int
asd_request_firmware
(
struct
asd_ha_struct
*
asd_ha
)
static
int
asd_request_firmware
(
struct
asd_ha_struct
*
asd_ha
)
{
{
int
err
,
i
;
int
err
,
i
;
struct
sequencer_file_header
header
,
*
hdr_ptr
;
struct
sequencer_file_header
header
;
const
struct
sequencer_file_header
*
hdr_ptr
;
u32
csum
=
0
;
u32
csum
=
0
;
u16
*
ptr_cseq_vecs
,
*
ptr_lseq_vecs
;
u16
*
ptr_cseq_vecs
,
*
ptr_lseq_vecs
;
...
@@ -1249,7 +1250,7 @@ static int asd_request_firmware(struct asd_ha_struct *asd_ha)
...
@@ -1249,7 +1250,7 @@ static int asd_request_firmware(struct asd_ha_struct *asd_ha)
if
(
err
)
if
(
err
)
return
err
;
return
err
;
hdr_ptr
=
(
struct
sequencer_file_header
*
)
sequencer_fw
->
data
;
hdr_ptr
=
(
const
struct
sequencer_file_header
*
)
sequencer_fw
->
data
;
header
.
csum
=
le32_to_cpu
(
hdr_ptr
->
csum
);
header
.
csum
=
le32_to_cpu
(
hdr_ptr
->
csum
);
header
.
major
=
le32_to_cpu
(
hdr_ptr
->
major
);
header
.
major
=
le32_to_cpu
(
hdr_ptr
->
major
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录