Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
356bd146
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
356bd146
编写于
12月 11, 2006
作者:
F
Francois Romieu
提交者:
Jeff Garzik
2月 05, 2007
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chelsio: spaces, tabs and friends
Signed-off-by:
N
Francois Romieu
<
romieu@fr.zoreil.com
>
上级
b7d58394
变更
15
显示空白变更内容
内联
并排
Showing
15 changed file
with
288 addition
and
288 deletion
+288
-288
drivers/net/chelsio/common.h
drivers/net/chelsio/common.h
+1
-1
drivers/net/chelsio/cpl5_cmd.h
drivers/net/chelsio/cpl5_cmd.h
+9
-9
drivers/net/chelsio/cxgb2.c
drivers/net/chelsio/cxgb2.c
+32
-32
drivers/net/chelsio/elmer0.h
drivers/net/chelsio/elmer0.h
+20
-20
drivers/net/chelsio/espi.c
drivers/net/chelsio/espi.c
+20
-21
drivers/net/chelsio/fpga_defs.h
drivers/net/chelsio/fpga_defs.h
+3
-3
drivers/net/chelsio/gmac.h
drivers/net/chelsio/gmac.h
+9
-2
drivers/net/chelsio/ixf1010.c
drivers/net/chelsio/ixf1010.c
+2
-2
drivers/net/chelsio/mv88e1xxx.c
drivers/net/chelsio/mv88e1xxx.c
+7
-10
drivers/net/chelsio/pm3393.c
drivers/net/chelsio/pm3393.c
+4
-4
drivers/net/chelsio/sge.c
drivers/net/chelsio/sge.c
+64
-61
drivers/net/chelsio/subr.c
drivers/net/chelsio/subr.c
+41
-42
drivers/net/chelsio/tp.c
drivers/net/chelsio/tp.c
+30
-32
drivers/net/chelsio/vsc7326.c
drivers/net/chelsio/vsc7326.c
+28
-29
drivers/net/chelsio/vsc8244.c
drivers/net/chelsio/vsc8244.c
+18
-20
未找到文件。
drivers/net/chelsio/common.h
浏览文件 @
356bd146
drivers/net/chelsio/cpl5_cmd.h
浏览文件 @
356bd146
drivers/net/chelsio/cxgb2.c
浏览文件 @
356bd146
...
@@ -233,7 +233,7 @@ static int cxgb_up(struct adapter *adapter)
...
@@ -233,7 +233,7 @@ static int cxgb_up(struct adapter *adapter)
t1_sge_start
(
adapter
->
sge
);
t1_sge_start
(
adapter
->
sge
);
t1_interrupts_enable
(
adapter
);
t1_interrupts_enable
(
adapter
);
out_err:
out_err:
return
err
;
return
err
;
}
}
...
@@ -1211,9 +1211,9 @@ static int __devinit init_one(struct pci_dev *pdev,
...
@@ -1211,9 +1211,9 @@ static int __devinit init_one(struct pci_dev *pdev,
return
0
;
return
0
;
out_release_adapter_res:
out_release_adapter_res:
t1_free_sw_modules
(
adapter
);
t1_free_sw_modules
(
adapter
);
out_free_dev:
out_free_dev:
if
(
adapter
)
{
if
(
adapter
)
{
if
(
adapter
->
regs
)
if
(
adapter
->
regs
)
iounmap
(
adapter
->
regs
);
iounmap
(
adapter
->
regs
);
...
@@ -1222,7 +1222,7 @@ static int __devinit init_one(struct pci_dev *pdev,
...
@@ -1222,7 +1222,7 @@ static int __devinit init_one(struct pci_dev *pdev,
free_netdev
(
adapter
->
port
[
i
].
dev
);
free_netdev
(
adapter
->
port
[
i
].
dev
);
}
}
pci_release_regions
(
pdev
);
pci_release_regions
(
pdev
);
out_disable_pdev:
out_disable_pdev:
pci_disable_device
(
pdev
);
pci_disable_device
(
pdev
);
pci_set_drvdata
(
pdev
,
NULL
);
pci_set_drvdata
(
pdev
,
NULL
);
return
err
;
return
err
;
...
...
drivers/net/chelsio/elmer0.h
浏览文件 @
356bd146
drivers/net/chelsio/espi.c
浏览文件 @
356bd146
...
@@ -341,8 +341,7 @@ u32 t1_espi_get_mon(adapter_t *adapter, u32 addr, u8 wait)
...
@@ -341,8 +341,7 @@ u32 t1_espi_get_mon(adapter_t *adapter, u32 addr, u8 wait)
* compare with t1_espi_get_mon(), it reads espiInTxSop[0 ~ 3] in
* compare with t1_espi_get_mon(), it reads espiInTxSop[0 ~ 3] in
* one shot, since there is no per port counter on the out side.
* one shot, since there is no per port counter on the out side.
*/
*/
int
int
t1_espi_get_mon_t204
(
adapter_t
*
adapter
,
u32
*
valp
,
u8
wait
)
t1_espi_get_mon_t204
(
adapter_t
*
adapter
,
u32
*
valp
,
u8
wait
)
{
{
struct
peespi
*
espi
=
adapter
->
espi
;
struct
peespi
*
espi
=
adapter
->
espi
;
u8
i
,
nport
=
(
u8
)
adapter
->
params
.
nports
;
u8
i
,
nport
=
(
u8
)
adapter
->
params
.
nports
;
...
@@ -353,7 +352,7 @@ t1_espi_get_mon_t204(adapter_t *adapter, u32 *valp, u8 wait)
...
@@ -353,7 +352,7 @@ t1_espi_get_mon_t204(adapter_t *adapter, u32 *valp, u8 wait)
}
else
}
else
spin_lock
(
&
espi
->
lock
);
spin_lock
(
&
espi
->
lock
);
if
(
(
espi
->
misc_ctrl
&
MON_MASK
)
!=
F_MONITORED_DIRECTION
)
{
if
(
(
espi
->
misc_ctrl
&
MON_MASK
)
!=
F_MONITORED_DIRECTION
)
{
espi
->
misc_ctrl
=
(
espi
->
misc_ctrl
&
~
MON_MASK
)
|
espi
->
misc_ctrl
=
(
espi
->
misc_ctrl
&
~
MON_MASK
)
|
F_MONITORED_DIRECTION
;
F_MONITORED_DIRECTION
;
writel
(
espi
->
misc_ctrl
,
adapter
->
regs
+
A_ESPI_MISC_CONTROL
);
writel
(
espi
->
misc_ctrl
,
adapter
->
regs
+
A_ESPI_MISC_CONTROL
);
...
...
drivers/net/chelsio/fpga_defs.h
浏览文件 @
356bd146
drivers/net/chelsio/gmac.h
浏览文件 @
356bd146
...
@@ -42,8 +42,15 @@
...
@@ -42,8 +42,15 @@
#include "common.h"
#include "common.h"
enum
{
MAC_STATS_UPDATE_FAST
,
MAC_STATS_UPDATE_FULL
};
enum
{
enum
{
MAC_DIRECTION_RX
=
1
,
MAC_DIRECTION_TX
=
2
};
MAC_STATS_UPDATE_FAST
,
MAC_STATS_UPDATE_FULL
};
enum
{
MAC_DIRECTION_RX
=
1
,
MAC_DIRECTION_TX
=
2
};
struct
cmac_statistics
{
struct
cmac_statistics
{
/* Transmit */
/* Transmit */
...
...
drivers/net/chelsio/ixf1010.c
浏览文件 @
356bd146
drivers/net/chelsio/mv88e1xxx.c
浏览文件 @
356bd146
...
@@ -73,9 +73,8 @@ static int mv88e1xxx_interrupt_enable(struct cphy *cphy)
...
@@ -73,9 +73,8 @@ static int mv88e1xxx_interrupt_enable(struct cphy *cphy)
t1_tpi_read
(
cphy
->
adapter
,
A_ELMER0_INT_ENABLE
,
&
elmer
);
t1_tpi_read
(
cphy
->
adapter
,
A_ELMER0_INT_ENABLE
,
&
elmer
);
elmer
|=
ELMER0_GP_BIT1
;
elmer
|=
ELMER0_GP_BIT1
;
if
(
is_T2
(
cphy
->
adapter
))
{
if
(
is_T2
(
cphy
->
adapter
))
elmer
|=
ELMER0_GP_BIT2
|
ELMER0_GP_BIT3
|
ELMER0_GP_BIT4
;
elmer
|=
ELMER0_GP_BIT2
|
ELMER0_GP_BIT3
|
ELMER0_GP_BIT4
;
}
t1_tpi_write
(
cphy
->
adapter
,
A_ELMER0_INT_ENABLE
,
elmer
);
t1_tpi_write
(
cphy
->
adapter
,
A_ELMER0_INT_ENABLE
,
elmer
);
}
}
return
0
;
return
0
;
...
@@ -92,9 +91,8 @@ static int mv88e1xxx_interrupt_disable(struct cphy *cphy)
...
@@ -92,9 +91,8 @@ static int mv88e1xxx_interrupt_disable(struct cphy *cphy)
t1_tpi_read
(
cphy
->
adapter
,
A_ELMER0_INT_ENABLE
,
&
elmer
);
t1_tpi_read
(
cphy
->
adapter
,
A_ELMER0_INT_ENABLE
,
&
elmer
);
elmer
&=
~
ELMER0_GP_BIT1
;
elmer
&=
~
ELMER0_GP_BIT1
;
if
(
is_T2
(
cphy
->
adapter
))
{
if
(
is_T2
(
cphy
->
adapter
))
elmer
&=
~
(
ELMER0_GP_BIT2
|
ELMER0_GP_BIT3
|
ELMER0_GP_BIT4
);
elmer
&=
~
(
ELMER0_GP_BIT2
|
ELMER0_GP_BIT3
|
ELMER0_GP_BIT4
);
}
t1_tpi_write
(
cphy
->
adapter
,
A_ELMER0_INT_ENABLE
,
elmer
);
t1_tpi_write
(
cphy
->
adapter
,
A_ELMER0_INT_ENABLE
,
elmer
);
}
}
return
0
;
return
0
;
...
@@ -112,9 +110,8 @@ static int mv88e1xxx_interrupt_clear(struct cphy *cphy)
...
@@ -112,9 +110,8 @@ static int mv88e1xxx_interrupt_clear(struct cphy *cphy)
if
(
t1_is_asic
(
cphy
->
adapter
))
{
if
(
t1_is_asic
(
cphy
->
adapter
))
{
t1_tpi_read
(
cphy
->
adapter
,
A_ELMER0_INT_CAUSE
,
&
elmer
);
t1_tpi_read
(
cphy
->
adapter
,
A_ELMER0_INT_CAUSE
,
&
elmer
);
elmer
|=
ELMER0_GP_BIT1
;
elmer
|=
ELMER0_GP_BIT1
;
if
(
is_T2
(
cphy
->
adapter
))
{
if
(
is_T2
(
cphy
->
adapter
))
elmer
|=
ELMER0_GP_BIT2
|
ELMER0_GP_BIT3
|
ELMER0_GP_BIT4
;
elmer
|=
ELMER0_GP_BIT2
|
ELMER0_GP_BIT3
|
ELMER0_GP_BIT4
;
}
t1_tpi_write
(
cphy
->
adapter
,
A_ELMER0_INT_CAUSE
,
elmer
);
t1_tpi_write
(
cphy
->
adapter
,
A_ELMER0_INT_CAUSE
,
elmer
);
}
}
return
0
;
return
0
;
...
...
drivers/net/chelsio/pm3393.c
浏览文件 @
356bd146
drivers/net/chelsio/sge.c
浏览文件 @
356bd146
...
@@ -460,7 +460,7 @@ static struct sk_buff *sched_skb(struct sge *sge, struct sk_buff *skb,
...
@@ -460,7 +460,7 @@ static struct sk_buff *sched_skb(struct sge *sge, struct sk_buff *skb,
if
(
credits
<
MAX_SKB_FRAGS
+
1
)
if
(
credits
<
MAX_SKB_FRAGS
+
1
)
goto
out
;
goto
out
;
again:
again:
for
(
i
=
0
;
i
<
MAX_NPORTS
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_NPORTS
;
i
++
)
{
s
->
port
=
++
s
->
port
&
(
MAX_NPORTS
-
1
);
s
->
port
=
++
s
->
port
&
(
MAX_NPORTS
-
1
);
skbq
=
&
s
->
p
[
s
->
port
].
skbq
;
skbq
=
&
s
->
p
[
s
->
port
].
skbq
;
...
@@ -483,7 +483,7 @@ static struct sk_buff *sched_skb(struct sge *sge, struct sk_buff *skb,
...
@@ -483,7 +483,7 @@ static struct sk_buff *sched_skb(struct sge *sge, struct sk_buff *skb,
if
(
update
--
&&
sched_update_avail
(
sge
))
if
(
update
--
&&
sched_update_avail
(
sge
))
goto
again
;
goto
again
;
out:
out:
/* If there are more pending skbs, we use the hardware to schedule us
/* If there are more pending skbs, we use the hardware to schedule us
* again.
* again.
*/
*/
...
@@ -850,7 +850,6 @@ static void refill_free_list(struct sge *sge, struct freelQ *q)
...
@@ -850,7 +850,6 @@ static void refill_free_list(struct sge *sge, struct freelQ *q)
struct
freelQ_e
*
e
=
&
q
->
entries
[
q
->
pidx
];
struct
freelQ_e
*
e
=
&
q
->
entries
[
q
->
pidx
];
unsigned
int
dma_len
=
q
->
rx_buffer_size
-
q
->
dma_offset
;
unsigned
int
dma_len
=
q
->
rx_buffer_size
-
q
->
dma_offset
;
while
(
q
->
credits
<
q
->
size
)
{
while
(
q
->
credits
<
q
->
size
)
{
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
dma_addr_t
mapping
;
dma_addr_t
mapping
;
...
@@ -881,7 +880,6 @@ static void refill_free_list(struct sge *sge, struct freelQ *q)
...
@@ -881,7 +880,6 @@ static void refill_free_list(struct sge *sge, struct freelQ *q)
}
}
q
->
credits
++
;
q
->
credits
++
;
}
}
}
}
/*
/*
...
@@ -1137,6 +1135,7 @@ static void unexpected_offload(struct adapter *adapter, struct freelQ *fl)
...
@@ -1137,6 +1135,7 @@ static void unexpected_offload(struct adapter *adapter, struct freelQ *fl)
static
inline
unsigned
int
compute_large_page_tx_descs
(
struct
sk_buff
*
skb
)
static
inline
unsigned
int
compute_large_page_tx_descs
(
struct
sk_buff
*
skb
)
{
{
unsigned
int
count
=
0
;
unsigned
int
count
=
0
;
if
(
PAGE_SIZE
>
SGE_TX_DESC_MAX_PLEN
)
{
if
(
PAGE_SIZE
>
SGE_TX_DESC_MAX_PLEN
)
{
unsigned
int
nfrags
=
skb_shinfo
(
skb
)
->
nr_frags
;
unsigned
int
nfrags
=
skb_shinfo
(
skb
)
->
nr_frags
;
unsigned
int
i
,
len
=
skb
->
len
-
skb
->
data_len
;
unsigned
int
i
,
len
=
skb
->
len
-
skb
->
data_len
;
...
@@ -1796,7 +1795,7 @@ static int t1_sge_tx(struct sk_buff *skb, struct adapter *adapter,
...
@@ -1796,7 +1795,7 @@ static int t1_sge_tx(struct sk_buff *skb, struct adapter *adapter,
* through the scheduler.
* through the scheduler.
*/
*/
if
(
sge
->
tx_sched
&&
!
qid
&&
skb
->
dev
)
{
if
(
sge
->
tx_sched
&&
!
qid
&&
skb
->
dev
)
{
use_sched:
use_sched:
use_sched_skb
=
1
;
use_sched_skb
=
1
;
/* Note that the scheduler might return a different skb than
/* Note that the scheduler might return a different skb than
* the one passed in.
* the one passed in.
...
@@ -2099,18 +2098,23 @@ static void espibug_workaround_t204(unsigned long data)
...
@@ -2099,18 +2098,23 @@ static void espibug_workaround_t204(unsigned long data)
if
(
adapter
->
open_device_map
&
PORT_MASK
)
{
if
(
adapter
->
open_device_map
&
PORT_MASK
)
{
int
i
;
int
i
;
if
(
t1_espi_get_mon_t204
(
adapter
,
&
(
seop
[
0
]),
0
)
<
0
)
{
if
(
t1_espi_get_mon_t204
(
adapter
,
&
(
seop
[
0
]),
0
)
<
0
)
return
;
return
;
}
for
(
i
=
0
;
i
<
nports
;
i
++
)
{
for
(
i
=
0
;
i
<
nports
;
i
++
)
{
struct
sk_buff
*
skb
=
sge
->
espibug_skb
[
i
];
struct
sk_buff
*
skb
=
sge
->
espibug_skb
[
i
];
if
(
(
netif_running
(
adapter
->
port
[
i
].
dev
))
&&
!
(
netif_queue_stopped
(
adapter
->
port
[
i
].
dev
))
&&
if
(
!
netif_running
(
adapter
->
port
[
i
].
dev
)
||
(
seop
[
i
]
&&
((
seop
[
i
]
&
0xfff
)
==
0
))
&&
netif_queue_stopped
(
adapter
->
port
[
i
].
dev
)
||
skb
)
{
!
seop
[
i
]
||
((
seop
[
i
]
&
0xfff
)
!=
0
)
||
!
skb
)
continue
;
if
(
!
skb
->
cb
[
0
])
{
if
(
!
skb
->
cb
[
0
])
{
u8
ch_mac_addr
[
ETH_ALEN
]
=
u8
ch_mac_addr
[
ETH_ALEN
]
=
{
{
0x0
,
0x7
,
0x43
,
0x0
,
0x0
,
0x0
};
0x0
,
0x7
,
0x43
,
0x0
,
0x0
,
0x0
};
memcpy
(
skb
->
data
+
sizeof
(
struct
cpl_tx_pkt
),
memcpy
(
skb
->
data
+
sizeof
(
struct
cpl_tx_pkt
),
ch_mac_addr
,
ETH_ALEN
);
ch_mac_addr
,
ETH_ALEN
);
memcpy
(
skb
->
data
+
skb
->
len
-
10
,
memcpy
(
skb
->
data
+
skb
->
len
-
10
,
...
@@ -2125,7 +2129,6 @@ static void espibug_workaround_t204(unsigned long data)
...
@@ -2125,7 +2129,6 @@ static void espibug_workaround_t204(unsigned long data)
t1_sge_tx
(
skb
,
adapter
,
0
,
adapter
->
port
[
i
].
dev
);
t1_sge_tx
(
skb
,
adapter
,
0
,
adapter
->
port
[
i
].
dev
);
}
}
}
}
}
mod_timer
(
&
sge
->
espibug_timer
,
jiffies
+
sge
->
espibug_timeout
);
mod_timer
(
&
sge
->
espibug_timer
,
jiffies
+
sge
->
espibug_timeout
);
}
}
...
...
drivers/net/chelsio/subr.c
浏览文件 @
356bd146
...
@@ -262,8 +262,7 @@ static int mi1_wait_until_ready(adapter_t *adapter, int mi1_reg)
...
@@ -262,8 +262,7 @@ static int mi1_wait_until_ready(adapter_t *adapter, int mi1_reg)
udelay
(
10
);
udelay
(
10
);
}
while
(
busy
&&
--
attempts
);
}
while
(
busy
&&
--
attempts
);
if
(
busy
)
if
(
busy
)
CH_ALERT
(
"%s: MDIO operation timed out
\n
"
,
CH_ALERT
(
"%s: MDIO operation timed out
\n
"
,
adapter
->
name
);
adapter
->
name
);
return
busy
;
return
busy
;
}
}
...
@@ -943,7 +942,7 @@ int t1_init_hw_modules(adapter_t *adapter)
...
@@ -943,7 +942,7 @@ int t1_init_hw_modules(adapter_t *adapter)
goto
out_err
;
goto
out_err
;
err
=
0
;
err
=
0
;
out_err:
out_err:
return
err
;
return
err
;
}
}
...
...
drivers/net/chelsio/tp.c
浏览文件 @
356bd146
...
@@ -17,27 +17,26 @@ struct petp {
...
@@ -17,27 +17,26 @@ struct petp {
static
void
tp_init
(
adapter_t
*
ap
,
const
struct
tp_params
*
p
,
static
void
tp_init
(
adapter_t
*
ap
,
const
struct
tp_params
*
p
,
unsigned
int
tp_clk
)
unsigned
int
tp_clk
)
{
{
if
(
t1_is_asic
(
ap
))
{
u32
val
;
u32
val
;
if
(
!
t1_is_asic
(
ap
))
return
;
val
=
F_TP_IN_CSPI_CPL
|
F_TP_IN_CSPI_CHECK_IP_CSUM
|
val
=
F_TP_IN_CSPI_CPL
|
F_TP_IN_CSPI_CHECK_IP_CSUM
|
F_TP_IN_CSPI_CHECK_TCP_CSUM
|
F_TP_IN_ESPI_ETHERNET
;
F_TP_IN_CSPI_CHECK_TCP_CSUM
|
F_TP_IN_ESPI_ETHERNET
;
if
(
!
p
->
pm_size
)
if
(
!
p
->
pm_size
)
val
|=
F_OFFLOAD_DISABLE
;
val
|=
F_OFFLOAD_DISABLE
;
else
else
val
|=
F_TP_IN_ESPI_CHECK_IP_CSUM
|
val
|=
F_TP_IN_ESPI_CHECK_IP_CSUM
|
F_TP_IN_ESPI_CHECK_TCP_CSUM
;
F_TP_IN_ESPI_CHECK_TCP_CSUM
;
writel
(
val
,
ap
->
regs
+
A_TP_IN_CONFIG
);
writel
(
val
,
ap
->
regs
+
A_TP_IN_CONFIG
);
writel
(
F_TP_OUT_CSPI_CPL
|
writel
(
F_TP_OUT_CSPI_CPL
|
F_TP_OUT_ESPI_ETHERNET
|
F_TP_OUT_ESPI_ETHERNET
|
F_TP_OUT_ESPI_GENERATE_IP_CSUM
|
F_TP_OUT_ESPI_GENERATE_IP_CSUM
|
F_TP_OUT_ESPI_GENERATE_TCP_CSUM
,
F_TP_OUT_ESPI_GENERATE_TCP_CSUM
,
ap
->
regs
+
A_TP_OUT_CONFIG
);
ap
->
regs
+
A_TP_OUT_CONFIG
);
writel
(
V_IP_TTL
(
64
)
|
writel
(
V_IP_TTL
(
64
)
|
F_PATH_MTU
/* IP DF bit */
|
F_PATH_MTU
/* IP DF bit */
|
V_5TUPLE_LOOKUP
(
p
->
use_5tuple_mode
)
|
V_5TUPLE_LOOKUP
(
p
->
use_5tuple_mode
)
|
V_SYN_COOKIE_PARAMETER
(
29
),
V_SYN_COOKIE_PARAMETER
(
29
),
ap
->
regs
+
A_TP_GLOBAL_CONFIG
);
ap
->
regs
+
A_TP_GLOBAL_CONFIG
);
/*
/*
* Enable pause frame deadlock prevention.
* Enable pause frame deadlock prevention.
*/
*/
...
@@ -49,8 +48,6 @@ static void tp_init(adapter_t * ap, const struct tp_params *p,
...
@@ -49,8 +48,6 @@ static void tp_init(adapter_t * ap, const struct tp_params *p,
V_NUM_PKTS_DROPPED
(
DROP_PKTS_CNT
),
V_NUM_PKTS_DROPPED
(
DROP_PKTS_CNT
),
ap
->
regs
+
A_TP_TX_DROP_CONFIG
);
ap
->
regs
+
A_TP_TX_DROP_CONFIG
);
}
}
}
}
}
void
t1_tp_destroy
(
struct
petp
*
tp
)
void
t1_tp_destroy
(
struct
petp
*
tp
)
...
@@ -61,6 +58,7 @@ void t1_tp_destroy(struct petp *tp)
...
@@ -61,6 +58,7 @@ void t1_tp_destroy(struct petp *tp)
struct
petp
*
__devinit
t1_tp_create
(
adapter_t
*
adapter
,
struct
tp_params
*
p
)
struct
petp
*
__devinit
t1_tp_create
(
adapter_t
*
adapter
,
struct
tp_params
*
p
)
{
{
struct
petp
*
tp
=
kzalloc
(
sizeof
(
*
tp
),
GFP_KERNEL
);
struct
petp
*
tp
=
kzalloc
(
sizeof
(
*
tp
),
GFP_KERNEL
);
if
(
!
tp
)
if
(
!
tp
)
return
NULL
;
return
NULL
;
...
...
drivers/net/chelsio/vsc7326.c
浏览文件 @
356bd146
...
@@ -234,10 +234,10 @@ static void run_table(adapter_t *adapter, struct init_table *ib, int len)
...
@@ -234,10 +234,10 @@ static void run_table(adapter_t *adapter, struct init_table *ib, int len)
static
int
bist_rd
(
adapter_t
*
adapter
,
int
moduleid
,
int
address
)
static
int
bist_rd
(
adapter_t
*
adapter
,
int
moduleid
,
int
address
)
{
{
int
data
=
0
;
int
data
=
0
;
u32
result
=
0
;
u32
result
=
0
;
if
(
(
address
!=
0x0
)
&&
if
(
(
address
!=
0x0
)
&&
(
address
!=
0x1
)
&&
(
address
!=
0x1
)
&&
(
address
!=
0x2
)
&&
(
address
!=
0x2
)
&&
(
address
!=
0xd
)
&&
(
address
!=
0xd
)
&&
...
@@ -251,9 +251,9 @@ static int bist_rd(adapter_t *adapter, int moduleid, int address)
...
@@ -251,9 +251,9 @@ static int bist_rd(adapter_t *adapter, int moduleid, int address)
udelay
(
10
);
udelay
(
10
);
vsc_read
(
adapter
,
REG_RAM_BIST_RESULT
,
&
result
);
vsc_read
(
adapter
,
REG_RAM_BIST_RESULT
,
&
result
);
if
((
result
&
(
1
<<
9
))
!=
0x0
)
if
((
result
&
(
1
<<
9
))
!=
0x0
)
CH_ERR
(
"Still in bist read: 0x%x
\n
"
,
result
);
CH_ERR
(
"Still in bist read: 0x%x
\n
"
,
result
);
else
if
((
result
&
(
1
<<
8
))
!=
0x0
)
else
if
((
result
&
(
1
<<
8
))
!=
0x0
)
CH_ERR
(
"bist read error: 0x%x
\n
"
,
result
);
CH_ERR
(
"bist read error: 0x%x
\n
"
,
result
);
return
(
result
&
0xff
);
return
(
result
&
0xff
);
...
@@ -261,17 +261,17 @@ static int bist_rd(adapter_t *adapter, int moduleid, int address)
...
@@ -261,17 +261,17 @@ static int bist_rd(adapter_t *adapter, int moduleid, int address)
static
int
bist_wr
(
adapter_t
*
adapter
,
int
moduleid
,
int
address
,
int
value
)
static
int
bist_wr
(
adapter_t
*
adapter
,
int
moduleid
,
int
address
,
int
value
)
{
{
int
data
=
0
;
int
data
=
0
;
u32
result
=
0
;
u32
result
=
0
;
if
(
(
address
!=
0x0
)
&&
if
(
(
address
!=
0x0
)
&&
(
address
!=
0x1
)
&&
(
address
!=
0x1
)
&&
(
address
!=
0x2
)
&&
(
address
!=
0x2
)
&&
(
address
!=
0xd
)
&&
(
address
!=
0xd
)
&&
(
address
!=
0xe
))
(
address
!=
0xe
))
CH_ERR
(
"No bist address: 0x%x
\n
"
,
address
);
CH_ERR
(
"No bist address: 0x%x
\n
"
,
address
);
if
(
value
>
255
)
if
(
value
>
255
)
CH_ERR
(
"Suspicious write out of range value: 0x%x
\n
"
,
value
);
CH_ERR
(
"Suspicious write out of range value: 0x%x
\n
"
,
value
);
data
=
((
0x01
<<
24
)
|
((
address
&
0xff
)
<<
16
)
|
(
value
<<
8
)
|
data
=
((
0x01
<<
24
)
|
((
address
&
0xff
)
<<
16
)
|
(
value
<<
8
)
|
...
@@ -281,9 +281,9 @@ static int bist_wr(adapter_t *adapter, int moduleid, int address, int value)
...
@@ -281,9 +281,9 @@ static int bist_wr(adapter_t *adapter, int moduleid, int address, int value)
udelay
(
5
);
udelay
(
5
);
vsc_read
(
adapter
,
REG_RAM_BIST_CMD
,
&
result
);
vsc_read
(
adapter
,
REG_RAM_BIST_CMD
,
&
result
);
if
((
result
&
(
1
<<
27
))
!=
0x0
)
if
((
result
&
(
1
<<
27
))
!=
0x0
)
CH_ERR
(
"Still in bist write: 0x%x
\n
"
,
result
);
CH_ERR
(
"Still in bist write: 0x%x
\n
"
,
result
);
else
if
((
result
&
(
1
<<
26
))
!=
0x0
)
else
if
((
result
&
(
1
<<
26
))
!=
0x0
)
CH_ERR
(
"bist write error: 0x%x
\n
"
,
result
);
CH_ERR
(
"bist write error: 0x%x
\n
"
,
result
);
return
0
;
return
0
;
...
@@ -321,15 +321,14 @@ static int enable_mem(adapter_t *adapter, int moduleid)
...
@@ -321,15 +321,14 @@ static int enable_mem(adapter_t *adapter, int moduleid)
static
int
run_bist_all
(
adapter_t
*
adapter
)
static
int
run_bist_all
(
adapter_t
*
adapter
)
{
{
int
port
=
0
;
int
port
=
0
;
u32
val
=
0
;
u32
val
=
0
;
vsc_write
(
adapter
,
REG_MEM_BIST
,
0x5
);
vsc_write
(
adapter
,
REG_MEM_BIST
,
0x5
);
vsc_read
(
adapter
,
REG_MEM_BIST
,
&
val
);
vsc_read
(
adapter
,
REG_MEM_BIST
,
&
val
);
for
(
port
=
0
;
port
<
12
;
port
++
){
for
(
port
=
0
;
port
<
12
;
port
++
)
vsc_write
(
adapter
,
REG_DEV_SETUP
(
port
),
0x0
);
vsc_write
(
adapter
,
REG_DEV_SETUP
(
port
),
0x0
);
}
udelay
(
300
);
udelay
(
300
);
vsc_write
(
adapter
,
REG_SPI4_MISC
,
0x00040409
);
vsc_write
(
adapter
,
REG_SPI4_MISC
,
0x00040409
);
...
@@ -352,9 +351,9 @@ static int run_bist_all(adapter_t *adapter)
...
@@ -352,9 +351,9 @@ static int run_bist_all(adapter_t *adapter)
udelay
(
300
);
udelay
(
300
);
vsc_write
(
adapter
,
REG_SPI4_MISC
,
0x60040400
);
vsc_write
(
adapter
,
REG_SPI4_MISC
,
0x60040400
);
udelay
(
300
);
udelay
(
300
);
for
(
port
=
0
;
port
<
12
;
port
++
){
for
(
port
=
0
;
port
<
12
;
port
++
)
vsc_write
(
adapter
,
REG_DEV_SETUP
(
port
),
0x1
);
vsc_write
(
adapter
,
REG_DEV_SETUP
(
port
),
0x1
);
}
udelay
(
300
);
udelay
(
300
);
vsc_write
(
adapter
,
REG_MEM_BIST
,
0x0
);
vsc_write
(
adapter
,
REG_MEM_BIST
,
0x0
);
mdelay
(
10
);
mdelay
(
10
);
...
...
drivers/net/chelsio/vsc8244.c
浏览文件 @
356bd146
...
@@ -100,9 +100,8 @@ static int vsc8244_intr_enable(struct cphy *cphy)
...
@@ -100,9 +100,8 @@ static int vsc8244_intr_enable(struct cphy *cphy)
t1_tpi_read
(
cphy
->
adapter
,
A_ELMER0_INT_ENABLE
,
&
elmer
);
t1_tpi_read
(
cphy
->
adapter
,
A_ELMER0_INT_ENABLE
,
&
elmer
);
elmer
|=
ELMER0_GP_BIT1
;
elmer
|=
ELMER0_GP_BIT1
;
if
(
is_T2
(
cphy
->
adapter
))
{
if
(
is_T2
(
cphy
->
adapter
))
elmer
|=
ELMER0_GP_BIT2
|
ELMER0_GP_BIT3
|
ELMER0_GP_BIT4
;
elmer
|=
ELMER0_GP_BIT2
|
ELMER0_GP_BIT3
|
ELMER0_GP_BIT4
;
}
t1_tpi_write
(
cphy
->
adapter
,
A_ELMER0_INT_ENABLE
,
elmer
);
t1_tpi_write
(
cphy
->
adapter
,
A_ELMER0_INT_ENABLE
,
elmer
);
}
}
...
@@ -118,9 +117,8 @@ static int vsc8244_intr_disable(struct cphy *cphy)
...
@@ -118,9 +117,8 @@ static int vsc8244_intr_disable(struct cphy *cphy)
t1_tpi_read
(
cphy
->
adapter
,
A_ELMER0_INT_ENABLE
,
&
elmer
);
t1_tpi_read
(
cphy
->
adapter
,
A_ELMER0_INT_ENABLE
,
&
elmer
);
elmer
&=
~
ELMER0_GP_BIT1
;
elmer
&=
~
ELMER0_GP_BIT1
;
if
(
is_T2
(
cphy
->
adapter
))
{
if
(
is_T2
(
cphy
->
adapter
))
elmer
&=
~
(
ELMER0_GP_BIT2
|
ELMER0_GP_BIT3
|
ELMER0_GP_BIT4
);
elmer
&=
~
(
ELMER0_GP_BIT2
|
ELMER0_GP_BIT3
|
ELMER0_GP_BIT4
);
}
t1_tpi_write
(
cphy
->
adapter
,
A_ELMER0_INT_ENABLE
,
elmer
);
t1_tpi_write
(
cphy
->
adapter
,
A_ELMER0_INT_ENABLE
,
elmer
);
}
}
...
@@ -138,9 +136,8 @@ static int vsc8244_intr_clear(struct cphy *cphy)
...
@@ -138,9 +136,8 @@ static int vsc8244_intr_clear(struct cphy *cphy)
if
(
t1_is_asic
(
cphy
->
adapter
))
{
if
(
t1_is_asic
(
cphy
->
adapter
))
{
t1_tpi_read
(
cphy
->
adapter
,
A_ELMER0_INT_CAUSE
,
&
elmer
);
t1_tpi_read
(
cphy
->
adapter
,
A_ELMER0_INT_CAUSE
,
&
elmer
);
elmer
|=
ELMER0_GP_BIT1
;
elmer
|=
ELMER0_GP_BIT1
;
if
(
is_T2
(
cphy
->
adapter
))
{
if
(
is_T2
(
cphy
->
adapter
))
elmer
|=
ELMER0_GP_BIT2
|
ELMER0_GP_BIT3
|
ELMER0_GP_BIT4
;
elmer
|=
ELMER0_GP_BIT2
|
ELMER0_GP_BIT3
|
ELMER0_GP_BIT4
;
}
t1_tpi_write
(
cphy
->
adapter
,
A_ELMER0_INT_CAUSE
,
elmer
);
t1_tpi_write
(
cphy
->
adapter
,
A_ELMER0_INT_CAUSE
,
elmer
);
}
}
...
@@ -343,7 +340,8 @@ static struct cphy_ops vsc8244_ops = {
...
@@ -343,7 +340,8 @@ static struct cphy_ops vsc8244_ops = {
.
get_link_status
=
vsc8244_get_link_status
.
get_link_status
=
vsc8244_get_link_status
};
};
static
struct
cphy
*
vsc8244_phy_create
(
adapter_t
*
adapter
,
int
phy_addr
,
struct
mdio_ops
*
mdio_ops
)
static
struct
cphy
*
vsc8244_phy_create
(
adapter_t
*
adapter
,
int
phy_addr
,
struct
mdio_ops
*
mdio_ops
)
{
{
struct
cphy
*
cphy
=
kzalloc
(
sizeof
(
*
cphy
),
GFP_KERNEL
);
struct
cphy
*
cphy
=
kzalloc
(
sizeof
(
*
cphy
),
GFP_KERNEL
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录