Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
31d881c7
Commit
31d881c7
authored
Jan 24, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/davem/net-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
11828b23
79476f70
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
13 deletions
+29
-13
drivers/net/tg3.c
drivers/net/tg3.c
+26
-13
drivers/net/tg3.h
drivers/net/tg3.h
+1
-0
net/ipv4/ip_output.c
net/ipv4/ip_output.c
+1
-0
net/ipv6/ip6_output.c
net/ipv6/ip6_output.c
+1
-0
No files found.
drivers/net/tg3.c
View file @
31d881c7
...
...
@@ -60,8 +60,8 @@
#define DRV_MODULE_NAME "tg3"
#define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "3.1
7
"
#define DRV_MODULE_RELDATE "January 2
2
, 2005"
#define DRV_MODULE_VERSION "3.1
8
"
#define DRV_MODULE_RELDATE "January 2
4
, 2005"
#define TG3_DEF_MAC_MODE 0
#define TG3_DEF_RX_MODE 0
...
...
@@ -3111,11 +3111,19 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
skb
->
nh
.
iph
->
check
=
0
;
skb
->
nh
.
iph
->
tot_len
=
ntohs
(
mss
+
ip_tcp_len
+
tcp_opt_len
);
skb
->
h
.
th
->
check
=
~
csum_tcpudp_magic
(
skb
->
nh
.
iph
->
saddr
,
skb
->
nh
.
iph
->
daddr
,
0
,
IPPROTO_TCP
,
0
);
if
(
tp
->
tg3_flags2
&
TG3_FLG2_HW_TSO
)
{
skb
->
h
.
th
->
check
=
0
;
base_flags
&=
~
TXD_FLAG_TCPUDP_CSUM
;
}
else
{
skb
->
h
.
th
->
check
=
~
csum_tcpudp_magic
(
skb
->
nh
.
iph
->
saddr
,
skb
->
nh
.
iph
->
daddr
,
0
,
IPPROTO_TCP
,
0
);
}
if
(
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5705
)
{
if
((
tp
->
tg3_flags2
&
TG3_FLG2_HW_TSO
)
||
(
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5705
))
{
if
(
tcp_opt_len
||
skb
->
nh
.
iph
->
ihl
>
5
)
{
int
tsflags
;
...
...
@@ -3182,7 +3190,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
would_hit_hwbug
=
entry
+
1
;
}
if
(
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5750
)
if
(
tp
->
tg3_flags2
&
TG3_FLG2_HW_TSO
)
tg3_set_txd
(
tp
,
entry
,
mapping
,
len
,
base_flags
,
(
i
==
last
)
|
(
mss
<<
1
));
else
...
...
@@ -4774,7 +4782,7 @@ static int tg3_load_tso_firmware(struct tg3 *tp)
unsigned
long
cpu_base
,
cpu_scratch_base
,
cpu_scratch_size
;
int
err
,
i
;
if
(
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5750
)
if
(
tp
->
tg3_flags2
&
TG3_FLG2_HW_TSO
)
return
0
;
if
(
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5705
)
{
...
...
@@ -5208,7 +5216,7 @@ static int tg3_reset_hw(struct tg3 *tp)
}
#if TG3_TSO_SUPPORT != 0
if
(
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5750
)
if
(
tp
->
tg3_flags2
&
TG3_FLG2_HW_TSO
)
rdmac_mode
|=
(
1
<<
27
);
#endif
...
...
@@ -5358,7 +5366,7 @@ static int tg3_reset_hw(struct tg3 *tp)
tw32
(
RCVDBDI_MODE
,
RCVDBDI_MODE_ENABLE
|
RCVDBDI_MODE_INV_RING_SZ
);
tw32
(
SNDDATAI_MODE
,
SNDDATAI_MODE_ENABLE
);
#if TG3_TSO_SUPPORT != 0
if
(
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5750
)
if
(
tp
->
tg3_flags2
&
TG3_FLG2_HW_TSO
)
tw32
(
SNDDATAI_MODE
,
SNDDATAI_MODE_ENABLE
|
0x8
);
#endif
tw32
(
SNDBDI_MODE
,
SNDBDI_MODE_ENABLE
|
SNDBDI_MODE_ATTN_ENABLE
);
...
...
@@ -7867,6 +7875,9 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
tp
->
pci_hdr_type
=
(
cacheline_sz_reg
>>
16
)
&
0xff
;
tp
->
pci_bist
=
(
cacheline_sz_reg
>>
24
)
&
0xff
;
if
(
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5750
)
tp
->
tg3_flags2
|=
TG3_FLG2_HW_TSO
;
if
(
pci_find_capability
(
tp
->
pdev
,
PCI_CAP_ID_EXP
)
!=
0
)
tp
->
tg3_flags2
|=
TG3_FLG2_PCI_EXPRESS
;
...
...
@@ -8762,11 +8773,13 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
}
#if TG3_TSO_SUPPORT != 0
if
(
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5700
||
if
(
tp
->
tg3_flags2
&
TG3_FLG2_HW_TSO
)
{
tp
->
tg3_flags2
|=
TG3_FLG2_TSO_CAPABLE
;
}
else
if
(
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5700
||
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5701
||
tp
->
pci_chip_rev_id
==
CHIPREV_ID_5705_A0
||
((
tp
->
tg3_flags
&
TG3_FLAG_ENABLE_ASF
)
!=
0
&&
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
!=
ASIC_REV_5750
))
{
(
tp
->
tg3_flags
&
TG3_FLAG_ENABLE_ASF
)
!=
0
)
{
tp
->
tg3_flags2
&=
~
TG3_FLG2_TSO_CAPABLE
;
}
else
{
tp
->
tg3_flags2
|=
TG3_FLG2_TSO_CAPABLE
;
...
...
drivers/net/tg3.h
View file @
31d881c7
...
...
@@ -2105,6 +2105,7 @@ struct tg3 {
#define TG3_FLG2_PHY_SERDES 0x00002000
#define TG3_FLG2_CAPACITIVE_COUPLING 0x00004000
#define TG3_FLG2_FLASH 0x00008000
#define TG3_FLG2_HW_TSO 0x00010000
u32
split_mode_max_reqs
;
#define SPLIT_MODE_5704_MAX_REQ 3
...
...
net/ipv4/ip_output.c
View file @
31d881c7
...
...
@@ -504,6 +504,7 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*))
/* Prepare header of the next frame,
* before previous one went down. */
if
(
frag
)
{
frag
->
ip_summed
=
CHECKSUM_NONE
;
frag
->
h
.
raw
=
frag
->
data
;
frag
->
nh
.
raw
=
__skb_push
(
frag
,
hlen
);
memcpy
(
frag
->
nh
.
raw
,
iph
,
hlen
);
...
...
net/ipv6/ip6_output.c
View file @
31d881c7
...
...
@@ -592,6 +592,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
/* Prepare header of the next frame,
* before previous one went down. */
if
(
frag
)
{
frag
->
ip_summed
=
CHECKSUM_NONE
;
frag
->
h
.
raw
=
frag
->
data
;
fh
=
(
struct
frag_hdr
*
)
__skb_push
(
frag
,
sizeof
(
struct
frag_hdr
));
frag
->
nh
.
raw
=
__skb_push
(
frag
,
hlen
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment