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
68fd20d3
Commit
68fd20d3
authored
Jan 10, 2003
by
Alan Cox
Committed by
Linus Torvalds
Jan 10, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] 3c501 - fix end of small packet clearing
parent
efa0596f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
drivers/net/3c501.c
drivers/net/3c501.c
+17
-2
No files found.
drivers/net/3c501.c
View file @
68fd20d3
...
...
@@ -36,6 +36,10 @@
Check up pass for 2.5. Nothing significant changed
20021009 Alan Cox <alan@redhat.com>
Fixed zero fill corner case
20030104 Alan Cox <alan@redhat.com>
For the avoidance of doubt the "preferred form" of this code is one which
is in an open non patent encumbered format. Where cryptographic key signing
...
...
@@ -421,8 +425,15 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
do
{
int
gp_start
=
0x800
-
(
ETH_ZLEN
<
skb
->
len
?
skb
->
len
:
ETH_ZLEN
);
int
len
=
skb
->
len
;
int
pad
=
0
;
int
gp_start
;
unsigned
char
*
buf
=
skb
->
data
;
if
(
len
<
ETH_ZLEN
)
pad
=
ETH_ZLEN
-
len
;
gp_start
=
0x800
-
(
len
+
pad
);
lp
->
tx_pkt_start
=
gp_start
;
lp
->
collisions
=
0
;
...
...
@@ -450,7 +461,11 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
outw
(
0x00
,
RX_BUF_CLR
);
/* Set rx packet area to 0. */
outw
(
gp_start
,
GP_LOW
);
/* aim - packet will be loaded into buffer start */
outsb
(
DATAPORT
,
buf
,
skb
->
len
);
/* load buffer (usual thing each byte increments the pointer) */
outsb
(
DATAPORT
,
buf
,
len
);
/* load buffer (usual thing each byte increments the pointer) */
if
(
pad
)
{
while
(
pad
--
)
/* Zero fill buffer tail */
outb
(
0
,
DATAPORT
);
}
outw
(
gp_start
,
GP_LOW
);
/* the board reuses the same register */
if
(
lp
->
loading
!=
2
)
...
...
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