Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
c676504e
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
c676504e
编写于
8月 23, 2007
作者:
A
Al Viro
提交者:
David S. Miller
10月 10, 2007
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ixgb: endianness
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
Signed-off-by:
N
Jeff Garzik
<
jeff@garzik.org
>
上级
3e33545b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
26 addition
and
26 deletion
+26
-26
drivers/net/ixgb/ixgb_ee.c
drivers/net/ixgb/ixgb_ee.c
+8
-8
drivers/net/ixgb/ixgb_ee.h
drivers/net/ixgb/ixgb_ee.h
+14
-14
drivers/net/ixgb/ixgb_ethtool.c
drivers/net/ixgb/ixgb_ethtool.c
+2
-2
drivers/net/ixgb/ixgb_hw.h
drivers/net/ixgb/ixgb_hw.h
+2
-2
未找到文件。
drivers/net/ixgb/ixgb_ee.c
浏览文件 @
c676504e
...
...
@@ -411,7 +411,7 @@ ixgb_write_eeprom(struct ixgb_hw *hw, uint16_t offset, uint16_t data)
ixgb_cleanup_eeprom
(
hw
);
/* clear the init_ctrl_reg_1 to signify that the cache is invalidated */
ee_map
->
init_ctrl_reg_1
=
le16_to_cpu
(
EEPROM_ICW1_SIGNATURE_CLEAR
);
ee_map
->
init_ctrl_reg_1
=
cpu_to_le16
(
EEPROM_ICW1_SIGNATURE_CLEAR
);
return
;
}
...
...
@@ -476,19 +476,19 @@ ixgb_get_eeprom_data(struct ixgb_hw *hw)
uint16_t
ee_data
;
ee_data
=
ixgb_read_eeprom
(
hw
,
i
);
checksum
+=
ee_data
;
hw
->
eeprom
[
i
]
=
le16_to_cpu
(
ee_data
);
hw
->
eeprom
[
i
]
=
cpu_to_le16
(
ee_data
);
}
if
(
checksum
!=
(
uint16_t
)
EEPROM_SUM
)
{
DEBUGOUT
(
"ixgb_ee: Checksum invalid.
\n
"
);
/* clear the init_ctrl_reg_1 to signify that the cache is
* invalidated */
ee_map
->
init_ctrl_reg_1
=
le16_to_cpu
(
EEPROM_ICW1_SIGNATURE_CLEAR
);
ee_map
->
init_ctrl_reg_1
=
cpu_to_le16
(
EEPROM_ICW1_SIGNATURE_CLEAR
);
return
(
FALSE
);
}
if
((
ee_map
->
init_ctrl_reg_1
&
le16_to_cpu
(
EEPROM_ICW1_SIGNATURE_MASK
))
!=
le16_to_cpu
(
EEPROM_ICW1_SIGNATURE_VALID
))
{
if
((
ee_map
->
init_ctrl_reg_1
&
cpu_to_le16
(
EEPROM_ICW1_SIGNATURE_MASK
))
!=
cpu_to_le16
(
EEPROM_ICW1_SIGNATURE_VALID
))
{
DEBUGOUT
(
"ixgb_ee: Signature invalid.
\n
"
);
return
(
FALSE
);
}
...
...
@@ -511,8 +511,8 @@ ixgb_check_and_get_eeprom_data (struct ixgb_hw* hw)
{
struct
ixgb_ee_map_type
*
ee_map
=
(
struct
ixgb_ee_map_type
*
)
hw
->
eeprom
;
if
((
ee_map
->
init_ctrl_reg_1
&
le16_to_cpu
(
EEPROM_ICW1_SIGNATURE_MASK
))
==
le16_to_cpu
(
EEPROM_ICW1_SIGNATURE_VALID
))
{
if
((
ee_map
->
init_ctrl_reg_1
&
cpu_to_le16
(
EEPROM_ICW1_SIGNATURE_MASK
))
==
cpu_to_le16
(
EEPROM_ICW1_SIGNATURE_VALID
))
{
return
(
TRUE
);
}
else
{
return
ixgb_get_eeprom_data
(
hw
);
...
...
@@ -528,7 +528,7 @@ ixgb_check_and_get_eeprom_data (struct ixgb_hw* hw)
* Returns:
* Word at indexed offset in eeprom, if valid, 0 otherwise.
******************************************************************************/
uint16_t
__le16
ixgb_get_eeprom_word
(
struct
ixgb_hw
*
hw
,
uint16_t
index
)
{
...
...
drivers/net/ixgb/ixgb_ee.h
浏览文件 @
c676504e
...
...
@@ -76,22 +76,22 @@
/* EEPROM structure */
struct
ixgb_ee_map_type
{
uint8_t
mac_addr
[
IXGB_ETH_LENGTH_OF_ADDRESS
];
uint16_t
compatibility
;
uint16_t
reserved1
[
4
];
uint32_t
pba_number
;
uint16_t
init_ctrl_reg_1
;
uint16_t
subsystem_id
;
uint16_t
subvendor_id
;
uint16_t
device_id
;
uint16_t
vendor_id
;
uint16_t
init_ctrl_reg_2
;
uint16_t
oem_reserved
[
16
];
uint16_t
swdpins_reg
;
uint16_t
circuit_ctrl_reg
;
__le16
compatibility
;
__le16
reserved1
[
4
];
__le32
pba_number
;
__le16
init_ctrl_reg_1
;
__le16
subsystem_id
;
__le16
subvendor_id
;
__le16
device_id
;
__le16
vendor_id
;
__le16
init_ctrl_reg_2
;
__le16
oem_reserved
[
16
];
__le16
swdpins_reg
;
__le16
circuit_ctrl_reg
;
uint8_t
d3_power
;
uint8_t
d0_power
;
uint16_t
reserved2
[
28
];
uint16_t
checksum
;
__le16
reserved2
[
28
];
__le16
checksum
;
};
/* EEPROM Functions */
...
...
drivers/net/ixgb/ixgb_ethtool.c
浏览文件 @
c676504e
...
...
@@ -422,7 +422,7 @@ ixgb_get_eeprom(struct net_device *netdev,
{
struct
ixgb_adapter
*
adapter
=
netdev_priv
(
netdev
);
struct
ixgb_hw
*
hw
=
&
adapter
->
hw
;
uint16_t
*
eeprom_buff
;
__le16
*
eeprom_buff
;
int
i
,
max_len
,
first_word
,
last_word
;
int
ret_val
=
0
;
...
...
@@ -446,7 +446,7 @@ ixgb_get_eeprom(struct net_device *netdev,
first_word
=
eeprom
->
offset
>>
1
;
last_word
=
(
eeprom
->
offset
+
eeprom
->
len
-
1
)
>>
1
;
eeprom_buff
=
kmalloc
(
sizeof
(
uint16_t
)
*
eeprom_buff
=
kmalloc
(
sizeof
(
__le16
)
*
(
last_word
-
first_word
+
1
),
GFP_KERNEL
);
if
(
!
eeprom_buff
)
return
-
ENOMEM
;
...
...
drivers/net/ixgb/ixgb_hw.h
浏览文件 @
c676504e
...
...
@@ -711,7 +711,7 @@ struct ixgb_hw {
uint32_t
bar2
;
uint32_t
bar3
;
uint16_t
pci_cmd_word
;
/* PCI command register id from PCI configuration space */
uint16_t
eeprom
[
IXGB_EEPROM_SIZE
];
/* EEPROM contents read at init time */
__le16
eeprom
[
IXGB_EEPROM_SIZE
];
/* EEPROM contents read at init time */
unsigned
long
io_base
;
/* Our I/O mapped location */
uint32_t
lastLFC
;
uint32_t
lastRFC
;
...
...
@@ -809,7 +809,7 @@ void ixgb_get_ee_mac_addr(struct ixgb_hw *hw, uint8_t *mac_addr);
uint32_t
ixgb_get_ee_pba_number
(
struct
ixgb_hw
*
hw
);
uint16_t
ixgb_get_ee_device_id
(
struct
ixgb_hw
*
hw
);
boolean_t
ixgb_get_eeprom_data
(
struct
ixgb_hw
*
hw
);
uint16_t
ixgb_get_eeprom_word
(
struct
ixgb_hw
*
hw
,
uint16_t
index
);
__le16
ixgb_get_eeprom_word
(
struct
ixgb_hw
*
hw
,
uint16_t
index
);
/* Everything else */
void
ixgb_led_on
(
struct
ixgb_hw
*
hw
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录