Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
ac390c60
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
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看板
提交
ac390c60
编写于
17年前
作者:
A
Al Viro
提交者:
David S. Miller
17年前
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
annotate chelsio
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
Signed-off-by:
N
Jeff Garzik
<
jeff@garzik.org
>
上级
61cf46ad
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
6 deletion
+7
-6
drivers/net/chelsio/common.h
drivers/net/chelsio/common.h
+1
-1
drivers/net/chelsio/cxgb2.c
drivers/net/chelsio/cxgb2.c
+1
-1
drivers/net/chelsio/subr.c
drivers/net/chelsio/subr.c
+5
-4
未找到文件。
drivers/net/chelsio/common.h
浏览文件 @
ac390c60
...
...
@@ -379,7 +379,7 @@ extern int t1_link_start(struct cphy *phy, struct cmac *mac, struct link_config
extern
const
struct
board_info
*
t1_get_board_info
(
unsigned
int
board_id
);
extern
const
struct
board_info
*
t1_get_board_info_from_ids
(
unsigned
int
devid
,
unsigned
short
ssid
);
extern
int
t1_seeprom_read
(
adapter_t
*
adapter
,
u32
addr
,
u
32
*
data
);
extern
int
t1_seeprom_read
(
adapter_t
*
adapter
,
u32
addr
,
__le
32
*
data
);
extern
int
t1_get_board_rev
(
adapter_t
*
adapter
,
const
struct
board_info
*
bi
,
struct
adapter_params
*
p
);
extern
int
t1_init_hw_modules
(
adapter_t
*
adapter
);
...
...
This diff is collapsed.
Click to expand it.
drivers/net/chelsio/cxgb2.c
浏览文件 @
ac390c60
...
...
@@ -814,7 +814,7 @@ static int get_eeprom(struct net_device *dev, struct ethtool_eeprom *e,
e
->
magic
=
EEPROM_MAGIC
(
adapter
);
for
(
i
=
e
->
offset
&
~
3
;
i
<
e
->
offset
+
e
->
len
;
i
+=
sizeof
(
u32
))
t1_seeprom_read
(
adapter
,
i
,
(
u
32
*
)
&
buf
[
i
]);
t1_seeprom_read
(
adapter
,
i
,
(
__le
32
*
)
&
buf
[
i
]);
memcpy
(
data
,
buf
+
e
->
offset
,
e
->
len
);
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
drivers/net/chelsio/subr.c
浏览文件 @
ac390c60
...
...
@@ -563,10 +563,11 @@ struct chelsio_vpd_t {
* written to the Control register. The hardware device will set the flag to a
* one when 4B have been transferred to the Data register.
*/
int
t1_seeprom_read
(
adapter_t
*
adapter
,
u32
addr
,
u
32
*
data
)
int
t1_seeprom_read
(
adapter_t
*
adapter
,
u32
addr
,
__le
32
*
data
)
{
int
i
=
EEPROM_MAX_POLL
;
u16
val
;
u32
v
;
if
(
addr
>=
EEPROMSIZE
||
(
addr
&
3
))
return
-
EINVAL
;
...
...
@@ -582,8 +583,8 @@ int t1_seeprom_read(adapter_t *adapter, u32 addr, u32 *data)
adapter
->
name
,
addr
);
return
-
EIO
;
}
pci_read_config_dword
(
adapter
->
pdev
,
A_PCICFG_VPD_DATA
,
data
);
*
data
=
le32_to_cpu
(
*
data
);
pci_read_config_dword
(
adapter
->
pdev
,
A_PCICFG_VPD_DATA
,
&
v
);
*
data
=
cpu_to_le32
(
v
);
return
0
;
}
...
...
@@ -593,7 +594,7 @@ static int t1_eeprom_vpd_get(adapter_t *adapter, struct chelsio_vpd_t *vpd)
for
(
addr
=
0
;
!
ret
&&
addr
<
sizeof
(
*
vpd
);
addr
+=
sizeof
(
u32
))
ret
=
t1_seeprom_read
(
adapter
,
addr
,
(
u
32
*
)((
u8
*
)
vpd
+
addr
));
(
__le
32
*
)((
u8
*
)
vpd
+
addr
));
return
ret
;
}
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部