Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Linux-御风守护者
linux
提交
3bbddbad
L
linux
项目概览
Linux-御风守护者
/
linux
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
3bbddbad
编写于
3月 01, 2010
作者:
R
Roland Dreier
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'nes' into for-next
上级
a835fb30
09124e19
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
284 addition
and
290 deletion
+284
-290
drivers/infiniband/hw/nes/nes.c
drivers/infiniband/hw/nes/nes.c
+1
-0
drivers/infiniband/hw/nes/nes.h
drivers/infiniband/hw/nes/nes.h
+5
-4
drivers/infiniband/hw/nes/nes_cm.c
drivers/infiniband/hw/nes/nes_cm.c
+6
-5
drivers/infiniband/hw/nes/nes_hw.c
drivers/infiniband/hw/nes/nes_hw.c
+259
-225
drivers/infiniband/hw/nes/nes_hw.h
drivers/infiniband/hw/nes/nes_hw.h
+1
-1
drivers/infiniband/hw/nes/nes_nic.c
drivers/infiniband/hw/nes/nes_nic.c
+9
-52
drivers/infiniband/hw/nes/nes_verbs.c
drivers/infiniband/hw/nes/nes_verbs.c
+3
-3
未找到文件。
drivers/infiniband/hw/nes/nes.c
浏览文件 @
3bbddbad
...
...
@@ -110,6 +110,7 @@ static unsigned int sysfs_idx_addr;
static
struct
pci_device_id
nes_pci_table
[]
=
{
{
PCI_VENDOR_ID_NETEFFECT
,
PCI_DEVICE_ID_NETEFFECT_NE020
,
PCI_ANY_ID
,
PCI_ANY_ID
},
{
PCI_VENDOR_ID_NETEFFECT
,
PCI_DEVICE_ID_NETEFFECT_NE020_KR
,
PCI_ANY_ID
,
PCI_ANY_ID
},
{
0
}
};
...
...
drivers/infiniband/hw/nes/nes.h
浏览文件 @
3bbddbad
...
...
@@ -64,8 +64,9 @@
* NetEffect PCI vendor id and NE010 PCI device id.
*/
#ifndef PCI_VENDOR_ID_NETEFFECT
/* not in pci.ids yet */
#define PCI_VENDOR_ID_NETEFFECT 0x1678
#define PCI_DEVICE_ID_NETEFFECT_NE020 0x0100
#define PCI_VENDOR_ID_NETEFFECT 0x1678
#define PCI_DEVICE_ID_NETEFFECT_NE020 0x0100
#define PCI_DEVICE_ID_NETEFFECT_NE020_KR 0x0110
#endif
#define NE020_REV 4
...
...
@@ -193,8 +194,8 @@ extern u32 cm_packets_created;
extern
u32
cm_packets_received
;
extern
u32
cm_packets_dropped
;
extern
u32
cm_packets_retrans
;
extern
u32
cm_listens_created
;
extern
u32
cm_listens_destroyed
;
extern
atomic_t
cm_listens_created
;
extern
atomic_t
cm_listens_destroyed
;
extern
u32
cm_backlog_drops
;
extern
atomic_t
cm_loopbacks
;
extern
atomic_t
cm_nodes_created
;
...
...
drivers/infiniband/hw/nes/nes_cm.c
浏览文件 @
3bbddbad
...
...
@@ -67,8 +67,8 @@ u32 cm_packets_dropped;
u32
cm_packets_retrans
;
u32
cm_packets_created
;
u32
cm_packets_received
;
u32
cm_listens_created
;
u32
cm_listens_destroyed
;
atomic_t
cm_listens_created
;
atomic_t
cm_listens_destroyed
;
u32
cm_backlog_drops
;
atomic_t
cm_loopbacks
;
atomic_t
cm_nodes_created
;
...
...
@@ -1011,9 +1011,10 @@ static int mini_cm_dec_refcnt_listen(struct nes_cm_core *cm_core,
event
.
cm_info
.
loc_port
=
loopback
->
loc_port
;
event
.
cm_info
.
cm_id
=
loopback
->
cm_id
;
add_ref_cm_node
(
loopback
);
loopback
->
state
=
NES_CM_STATE_CLOSED
;
cm_event_connect_error
(
&
event
);
cm_node
->
state
=
NES_CM_STATE_LISTENER_DESTROYED
;
loopback
->
state
=
NES_CM_STATE_CLOSED
;
rem_ref_cm_node
(
cm_node
->
cm_core
,
cm_node
);
...
...
@@ -1042,7 +1043,7 @@ static int mini_cm_dec_refcnt_listen(struct nes_cm_core *cm_core,
kfree
(
listener
);
listener
=
NULL
;
ret
=
0
;
cm_listens_destroyed
++
;
atomic_inc
(
&
cm_listens_destroyed
)
;
}
else
{
spin_unlock_irqrestore
(
&
cm_core
->
listen_list_lock
,
flags
);
}
...
...
@@ -3172,7 +3173,7 @@ int nes_create_listen(struct iw_cm_id *cm_id, int backlog)
g_cm_core
->
api
->
stop_listener
(
g_cm_core
,
(
void
*
)
cm_node
);
return
err
;
}
cm_listens_created
++
;
atomic_inc
(
&
cm_listens_created
)
;
}
cm_id
->
add_ref
(
cm_id
);
...
...
drivers/infiniband/hw/nes/nes_hw.c
浏览文件 @
3bbddbad
此差异已折叠。
点击以展开。
drivers/infiniband/hw/nes/nes_hw.h
浏览文件 @
3bbddbad
...
...
@@ -37,12 +37,12 @@
#define NES_PHY_TYPE_CX4 1
#define NES_PHY_TYPE_1G 2
#define NES_PHY_TYPE_IRIS 3
#define NES_PHY_TYPE_ARGUS 4
#define NES_PHY_TYPE_PUMA_1G 5
#define NES_PHY_TYPE_PUMA_10G 6
#define NES_PHY_TYPE_GLADIUS 7
#define NES_PHY_TYPE_SFP_D 8
#define NES_PHY_TYPE_KR 9
#define NES_MULTICAST_PF_MAX 8
...
...
drivers/infiniband/hw/nes/nes_nic.c
浏览文件 @
3bbddbad
...
...
@@ -1230,8 +1230,8 @@ static void nes_netdev_get_ethtool_stats(struct net_device *netdev,
target_stat_values
[
++
index
]
=
cm_packets_received
;
target_stat_values
[
++
index
]
=
cm_packets_dropped
;
target_stat_values
[
++
index
]
=
cm_packets_retrans
;
target_stat_values
[
++
index
]
=
cm_listens_created
;
target_stat_values
[
++
index
]
=
cm_listens_destroyed
;
target_stat_values
[
++
index
]
=
atomic_read
(
&
cm_listens_created
)
;
target_stat_values
[
++
index
]
=
atomic_read
(
&
cm_listens_destroyed
)
;
target_stat_values
[
++
index
]
=
cm_backlog_drops
;
target_stat_values
[
++
index
]
=
atomic_read
(
&
cm_loopbacks
);
target_stat_values
[
++
index
]
=
atomic_read
(
&
cm_nodes_created
);
...
...
@@ -1461,9 +1461,9 @@ static int nes_netdev_get_settings(struct net_device *netdev, struct ethtool_cmd
}
return
0
;
}
if
((
phy_type
==
NES_PHY_TYPE_
IRI
S
)
||
(
phy_type
==
NES_PHY_TYPE_
ARGUS
)
||
(
phy_type
==
NES_PHY_TYPE_
SFP_D
))
{
if
((
phy_type
==
NES_PHY_TYPE_
ARGU
S
)
||
(
phy_type
==
NES_PHY_TYPE_
SFP_D
)
||
(
phy_type
==
NES_PHY_TYPE_
KR
))
{
et_cmd
->
transceiver
=
XCVR_EXTERNAL
;
et_cmd
->
port
=
PORT_FIBRE
;
et_cmd
->
supported
=
SUPPORTED_FIBRE
;
...
...
@@ -1583,8 +1583,7 @@ struct net_device *nes_netdev_init(struct nes_device *nesdev,
struct
net_device
*
netdev
;
struct
nic_qp_map
*
curr_qp_map
;
u32
u32temp
;
u16
phy_data
;
u16
temp_phy_data
;
u8
phy_type
=
nesdev
->
nesadapter
->
phy_type
[
nesdev
->
mac_index
];
netdev
=
alloc_etherdev
(
sizeof
(
struct
nes_vnic
));
if
(
!
netdev
)
{
...
...
@@ -1692,65 +1691,23 @@ struct net_device *nes_netdev_init(struct nes_device *nesdev,
if
((
nesdev
->
netdev_count
==
0
)
&&
((
PCI_FUNC
(
nesdev
->
pcidev
->
devfn
)
==
nesdev
->
mac_index
)
||
((
nesdev
->
nesadapter
->
phy_type
[
nesdev
->
mac_index
]
==
NES_PHY_TYPE_PUMA_1G
)
&&
((
phy_type
==
NES_PHY_TYPE_PUMA_1G
)
&&
(((
PCI_FUNC
(
nesdev
->
pcidev
->
devfn
)
==
1
)
&&
(
nesdev
->
mac_index
==
2
))
||
((
PCI_FUNC
(
nesdev
->
pcidev
->
devfn
)
==
2
)
&&
(
nesdev
->
mac_index
==
1
))))))
{
/*
* nes_debug(NES_DBG_INIT, "Setting up PHY interrupt mask. Using register index 0x%04X\n",
* NES_IDX_PHY_PCS_CONTROL_STATUS0 + (0x200 * (nesvnic->logical_port & 1)));
*/
u32temp
=
nes_read_indexed
(
nesdev
,
NES_IDX_PHY_PCS_CONTROL_STATUS0
+
(
0x200
*
(
nesdev
->
mac_index
&
1
)));
if
(
nesdev
->
nesadapter
->
phy_type
[
nesdev
->
mac_index
]
!=
NES_PHY_TYPE_PUMA_1G
)
{
if
(
phy_type
!=
NES_PHY_TYPE_PUMA_1G
)
{
u32temp
|=
0x00200000
;
nes_write_indexed
(
nesdev
,
NES_IDX_PHY_PCS_CONTROL_STATUS0
+
(
0x200
*
(
nesdev
->
mac_index
&
1
)),
u32temp
);
}
u32temp
=
nes_read_indexed
(
nesdev
,
NES_IDX_PHY_PCS_CONTROL_STATUS0
+
(
0x200
*
(
nesdev
->
mac_index
&
1
)));
if
((
u32temp
&
0x0f1f0000
)
==
0x0f0f0000
)
{
if
(
nesdev
->
nesadapter
->
phy_type
[
nesdev
->
mac_index
]
==
NES_PHY_TYPE_IRIS
)
{
nes_init_phy
(
nesdev
);
nes_read_10G_phy_reg
(
nesdev
,
nesdev
->
nesadapter
->
phy_index
[
nesdev
->
mac_index
],
1
,
1
);
temp_phy_data
=
(
u16
)
nes_read_indexed
(
nesdev
,
NES_IDX_MAC_MDIO_CONTROL
);
u32temp
=
20
;
do
{
nes_read_10G_phy_reg
(
nesdev
,
nesdev
->
nesadapter
->
phy_index
[
nesdev
->
mac_index
],
1
,
1
);
phy_data
=
(
u16
)
nes_read_indexed
(
nesdev
,
NES_IDX_MAC_MDIO_CONTROL
);
if
((
phy_data
==
temp_phy_data
)
||
(
!
(
--
u32temp
)))
break
;
temp_phy_data
=
phy_data
;
}
while
(
1
);
if
(
phy_data
&
4
)
{
nes_debug
(
NES_DBG_INIT
,
"The Link is UP!!.
\n
"
);
nesvnic
->
linkup
=
1
;
}
else
{
nes_debug
(
NES_DBG_INIT
,
"The Link is DOWN!!.
\n
"
);
}
}
else
{
nes_debug
(
NES_DBG_INIT
,
"The Link is UP!!.
\n
"
);
nesvnic
->
linkup
=
1
;
}
}
else
if
(
nesdev
->
nesadapter
->
phy_type
[
nesdev
->
mac_index
]
==
NES_PHY_TYPE_PUMA_1G
)
{
nes_debug
(
NES_DBG_INIT
,
"mac_index=%d, logical_port=%d, u32temp=0x%04X, PCI_FUNC=%d
\n
"
,
nesdev
->
mac_index
,
nesvnic
->
logical_port
,
u32temp
,
PCI_FUNC
(
nesdev
->
pcidev
->
devfn
));
if
(((
nesdev
->
mac_index
<
2
)
&&
((
u32temp
&
0x01010000
)
==
0x01010000
))
||
((
nesdev
->
mac_index
>
1
)
&&
((
u32temp
&
0x02020000
)
==
0x02020000
)))
{
nes_debug
(
NES_DBG_INIT
,
"The Link is UP!!.
\n
"
);
nesvnic
->
linkup
=
1
;
}
}
/* clear the MAC interrupt status, assumes direct logical to physical mapping */
u32temp
=
nes_read_indexed
(
nesdev
,
NES_IDX_MAC_INT_STATUS
+
(
0x200
*
nesdev
->
mac_index
));
nes_debug
(
NES_DBG_INIT
,
"Phy interrupt status = 0x%X.
\n
"
,
u32temp
);
nes_write_indexed
(
nesdev
,
NES_IDX_MAC_INT_STATUS
+
(
0x200
*
nesdev
->
mac_index
),
u32temp
);
if
(
nesdev
->
nesadapter
->
phy_type
[
nesdev
->
mac_index
]
!=
NES_PHY_TYPE_IRIS
)
nes_init_phy
(
nesdev
);
nes_init_phy
(
nesdev
);
}
...
...
drivers/infiniband/hw/nes/nes_verbs.c
浏览文件 @
3bbddbad
...
...
@@ -228,7 +228,7 @@ static int nes_bind_mw(struct ib_qp *ibqp, struct ib_mw *ibmw,
/* Check for SQ overflow */
if
(((
head
+
(
2
*
qsize
)
-
nesqp
->
hwqp
.
sq_tail
)
%
qsize
)
==
(
qsize
-
1
))
{
spin_unlock_irqrestore
(
&
nesqp
->
lock
,
flags
);
return
-
E
INVAL
;
return
-
E
NOMEM
;
}
wqe
=
&
nesqp
->
hwqp
.
sq_vbase
[
head
];
...
...
@@ -3294,7 +3294,7 @@ static int nes_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr,
/* Check for SQ overflow */
if
(((
head
+
(
2
*
qsize
)
-
nesqp
->
hwqp
.
sq_tail
)
%
qsize
)
==
(
qsize
-
1
))
{
err
=
-
E
INVAL
;
err
=
-
E
NOMEM
;
break
;
}
...
...
@@ -3577,7 +3577,7 @@ static int nes_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *ib_wr,
}
/* Check for RQ overflow */
if
(((
head
+
(
2
*
qsize
)
-
nesqp
->
hwqp
.
rq_tail
)
%
qsize
)
==
(
qsize
-
1
))
{
err
=
-
E
INVAL
;
err
=
-
E
NOMEM
;
break
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录