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
fdc17a1b
Commit
fdc17a1b
authored
Mar 05, 2005
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
Merge pobox.com:/garz/repo/netdev-2.6/emac
into pobox.com:/garz/repo/net-drivers-2.6
parents
d103bdb4
1bdd99e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
drivers/net/ibm_emac/ibm_emac.h
drivers/net/ibm_emac/ibm_emac.h
+4
-0
drivers/net/ibm_emac/ibm_emac_core.c
drivers/net/ibm_emac/ibm_emac_core.c
+12
-4
drivers/net/ibm_emac/ibm_emac_core.h
drivers/net/ibm_emac/ibm_emac_core.h
+2
-0
No files found.
drivers/net/ibm_emac/ibm_emac.h
View file @
fdc17a1b
...
...
@@ -237,6 +237,10 @@ typedef struct emac_regs {
#define EMAC_RWMR_DEFAULT 0x1000a200
#define EMAC_TMR0_DEFAULT EMAC_TMR0_TFAE_2_32
#define EMAC_TMR1_DEFAULT 0xa00f0000
#elif defined(CONFIG_440SP)
#define EMAC_RWMR_DEFAULT 0x08002000
#define EMAC_TMR0_DEFAULT EMAC_TMR0_TFAE_128_2048
#define EMAC_TMR1_DEFAULT 0xf8200000
#else
#define EMAC_RWMR_DEFAULT 0x0f002000
#define EMAC_TMR0_DEFAULT 0x00000000
...
...
drivers/net/ibm_emac/ibm_emac_core.c
View file @
fdc17a1b
...
...
@@ -1041,7 +1041,7 @@ static int emac_adjust_to_link(struct ocp_enet_private *fep)
/* set speed (default is 10Mb) */
switch
(
speed
)
{
case
SPEED_1000
:
mode_reg
|=
EMAC_M1_
JUMBO_ENABLE
|
EMAC_M1_
RFS_16K
;
mode_reg
|=
EMAC_M1_RFS_16K
;
if
(
fep
->
rgmii_dev
)
{
struct
ibm_ocp_rgmii
*
rgmii
=
RGMII_PRIV
(
fep
->
rgmii_dev
);
...
...
@@ -1118,6 +1118,7 @@ static int emac_change_mtu(struct net_device *dev, int new_mtu)
{
struct
ocp_enet_private
*
fep
=
dev
->
priv
;
int
old_mtu
=
dev
->
mtu
;
unsigned
long
mode_reg
;
emac_t
*
emacp
=
fep
->
emacp
;
u32
em0mr0
;
int
i
,
full
;
...
...
@@ -1160,10 +1161,17 @@ static int emac_change_mtu(struct net_device *dev, int new_mtu)
fep
->
rx_skb
[
i
]
=
NULL
;
}
/* Set new rx_buffer_size and advertise new mtu */
fep
->
rx_buffer_size
=
new_mtu
+
ENET_HEADER_SIZE
+
ENET_FCS_SIZE
;
/* Set new rx_buffer_size, jumbo cap, and advertise new mtu */
mode_reg
=
in_be32
(
&
emacp
->
em0mr1
);
if
(
new_mtu
>
ENET_DEF_MTU_SIZE
)
{
mode_reg
|=
EMAC_M1_JUMBO_ENABLE
;
fep
->
rx_buffer_size
=
EMAC_MAX_FRAME
;
}
else
{
mode_reg
&=
~
EMAC_M1_JUMBO_ENABLE
;
fep
->
rx_buffer_size
=
ENET_DEF_BUF_SIZE
;
}
dev
->
mtu
=
new_mtu
;
out_be32
(
&
emacp
->
em0mr1
,
mode_reg
);
/* Re-init rx skbs */
fep
->
rx_slot
=
0
;
...
...
drivers/net/ibm_emac/ibm_emac_core.h
View file @
fdc17a1b
...
...
@@ -77,6 +77,8 @@
#define ENET_HEADER_SIZE 14
#define ENET_FCS_SIZE 4
#define ENET_DEF_MTU_SIZE 1500
#define ENET_DEF_BUF_SIZE (ENET_DEF_MTU_SIZE + ENET_HEADER_SIZE + ENET_FCS_SIZE)
#define EMAC_MIN_FRAME 64
#define EMAC_MAX_FRAME 9018
#define EMAC_MIN_MTU (EMAC_MIN_FRAME - ENET_HEADER_SIZE - ENET_FCS_SIZE)
...
...
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