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
nexedi
linux
Commits
41921071
Commit
41921071
authored
Jan 10, 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
1cf65f54
8333589e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
10 deletions
+26
-10
drivers/net/ibm_emac/ibm_emac.h
drivers/net/ibm_emac/ibm_emac.h
+1
-1
drivers/net/ibm_emac/ibm_emac_core.c
drivers/net/ibm_emac/ibm_emac_core.c
+15
-0
drivers/net/ibm_emac/ibm_emac_phy.c
drivers/net/ibm_emac/ibm_emac_phy.c
+10
-9
No files found.
drivers/net/ibm_emac/ibm_emac.h
View file @
41921071
...
...
@@ -98,7 +98,7 @@ typedef struct emac_regs {
#endif
/* CONFIG_IBM_EMAC4 */
#define EMAC_M1_BASE (EMAC_M1_TX_FIFO_2K | \
EMAC_M1_APP | \
EMAC_M1_TR)
EMAC_M1_TR
| EMAC_M1_VLE
)
/* Transmit Mode Register 0 */
#define EMAC_TMR0_GNP0 0x80000000
...
...
drivers/net/ibm_emac/ibm_emac_core.c
View file @
41921071
...
...
@@ -1363,6 +1363,9 @@ static void emac_reset_configure(struct ocp_enet_private *fep)
/* set frame gap */
out_be32
(
&
emacp
->
em0ipgvr
,
CONFIG_IBM_EMAC_FGAP
);
/* set VLAN Tag Protocol Identifier */
out_be32
(
&
emacp
->
em0vtpid
,
0x8100
);
/* Init ring buffers */
emac_init_rings
(
fep
->
ndev
);
...
...
@@ -1700,6 +1703,15 @@ struct mal_commac_ops emac_commac_ops = {
.
rxde
=
&
emac_rxde_dev
,
};
#ifdef CONFIG_NET_POLL_CONTROLLER
static
int
emac_netpoll
(
struct
net_device
*
ndev
)
{
emac_rxeob_dev
((
void
*
)
ndev
,
0
);
emac_txeob_dev
((
void
*
)
ndev
,
0
);
return
0
;
}
#endif
static
int
emac_init_device
(
struct
ocp_device
*
ocpdev
,
struct
ibm_ocp_mal
*
mal
)
{
int
deferred_init
=
0
;
...
...
@@ -1882,6 +1894,9 @@ static int emac_init_device(struct ocp_device *ocpdev, struct ibm_ocp_mal *mal)
SET_ETHTOOL_OPS
(
ndev
,
&
emac_ethtool_ops
);
if
(
emacdata
->
tah_idx
>=
0
)
ndev
->
features
=
NETIF_F_IP_CSUM
|
NETIF_F_SG
;
#ifdef CONFIG_NET_POLL_CONTROLLER
ndev
->
poll_controller
=
emac_netpoll
;
#endif
SET_MODULE_OWNER
(
ndev
);
...
...
drivers/net/ibm_emac/ibm_emac_phy.c
View file @
41921071
...
...
@@ -191,17 +191,18 @@ static int genmii_read_link(struct mii_phy *phy)
u16
lpa
;
if
(
phy
->
autoneg
)
{
lpa
=
phy_read
(
phy
,
MII_LPA
);
lpa
=
phy_read
(
phy
,
MII_LPA
)
&
phy_read
(
phy
,
MII_ADVERTISE
)
;
if
(
lpa
&
(
LPA_10FULL
|
LPA_100FULL
))
phy
->
duplex
=
DUPLEX_FULL
;
else
phy
->
duplex
=
DUPLEX_HALF
;
if
(
lpa
&
(
LPA_100FULL
|
LPA_100HALF
))
phy
->
speed
=
SPEED_100
;
else
phy
->
speed
=
SPEED_10
;
phy
->
speed
=
SPEED_10
;
phy
->
duplex
=
DUPLEX_HALF
;
phy
->
pause
=
0
;
if
(
lpa
&
(
LPA_100FULL
|
LPA_100HALF
))
{
phy
->
speed
=
SPEED_100
;
if
(
lpa
&
LPA_100FULL
)
phy
->
duplex
=
DUPLEX_FULL
;
}
else
if
(
lpa
&
LPA_10FULL
)
phy
->
duplex
=
DUPLEX_FULL
;
}
/* On non-aneg, we assume what we put in BMCR is the speed,
* though magic-aneg shouldn't prevent this case from occurring
...
...
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