Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
75ac6ae8
Commit
75ac6ae8
authored
May 24, 2006
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'upstream-fixes' into upstream
parents
db21e578
a1433ac4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
drivers/net/sky2.c
drivers/net/sky2.c
+16
-3
No files found.
drivers/net/sky2.c
View file @
75ac6ae8
...
...
@@ -979,6 +979,7 @@ static int sky2_rx_start(struct sky2_port *sky2)
struct
sky2_hw
*
hw
=
sky2
->
hw
;
unsigned
rxq
=
rxqaddr
[
sky2
->
port
];
int
i
;
unsigned
thresh
;
sky2
->
rx_put
=
sky2
->
rx_next
=
0
;
sky2_qset
(
hw
,
rxq
);
...
...
@@ -1003,9 +1004,21 @@ static int sky2_rx_start(struct sky2_port *sky2)
sky2_rx_add
(
sky2
,
re
->
mapaddr
);
}
/* Truncate oversize frames */
sky2_write16
(
hw
,
SK_REG
(
sky2
->
port
,
RX_GMF_TR_THR
),
sky2
->
rx_bufsize
-
8
);
sky2_write32
(
hw
,
SK_REG
(
sky2
->
port
,
RX_GMF_CTRL_T
),
RX_TRUNC_ON
);
/*
* The receiver hangs if it receives frames larger than the
* packet buffer. As a workaround, truncate oversize frames, but
* the register is limited to 9 bits, so if you do frames > 2052
* you better get the MTU right!
*/
thresh
=
(
sky2
->
rx_bufsize
-
8
)
/
sizeof
(
u32
);
if
(
thresh
>
0x1ff
)
sky2_write32
(
hw
,
SK_REG
(
sky2
->
port
,
RX_GMF_CTRL_T
),
RX_TRUNC_OFF
);
else
{
sky2_write16
(
hw
,
SK_REG
(
sky2
->
port
,
RX_GMF_TR_THR
),
thresh
);
sky2_write32
(
hw
,
SK_REG
(
sky2
->
port
,
RX_GMF_CTRL_T
),
RX_TRUNC_ON
);
}
/* Tell chip about available buffers */
sky2_write16
(
hw
,
Y2_QADDR
(
rxq
,
PREF_UNIT_PUT_IDX
),
sky2
->
rx_put
);
...
...
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