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
73c364e1
Commit
73c364e1
authored
May 24, 2016
by
Madalin Bucur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fsl/fman: return a phy_dev pointer from init
Signed-off-by:
Madalin Bucur
<
madalin.bucur@nxp.com
>
parent
537a3165
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
drivers/net/ethernet/freescale/fman/mac.c
drivers/net/ethernet/freescale/fman/mac.c
+11
-11
drivers/net/ethernet/freescale/fman/mac.h
drivers/net/ethernet/freescale/fman/mac.h
+2
-1
No files found.
drivers/net/ethernet/freescale/fman/mac.c
View file @
73c364e1
...
...
@@ -469,7 +469,7 @@ static void adjust_link_memac(struct net_device *net_dev)
/* Initializes driver's PHY state, and attaches to the PHY.
* Returns 0 on success.
*/
static
int
init_phy
(
struct
net_device
*
net_dev
,
static
struct
phy_device
*
init_phy
(
struct
net_device
*
net_dev
,
struct
mac_device
*
mac_dev
,
void
(
*
adj_lnk
)(
struct
net_device
*
))
{
...
...
@@ -480,7 +480,7 @@ static int init_phy(struct net_device *net_dev,
priv
->
phy_if
);
if
(
!
phy_dev
)
{
netdev_err
(
net_dev
,
"Could not connect to PHY
\n
"
);
return
-
ENODEV
;
return
NULL
;
}
/* Remove any features not supported by the controller */
...
...
@@ -493,22 +493,22 @@ static int init_phy(struct net_device *net_dev,
mac_dev
->
phy_dev
=
phy_dev
;
return
0
;
return
phy_dev
;
}
static
int
dtsec_init_phy
(
struct
net_device
*
net_dev
,
static
struct
phy_device
*
dtsec_init_phy
(
struct
net_device
*
net_dev
,
struct
mac_device
*
mac_dev
)
{
return
init_phy
(
net_dev
,
mac_dev
,
&
adjust_link_dtsec
);
}
static
int
tgec_init_phy
(
struct
net_device
*
net_dev
,
static
struct
phy_device
*
tgec_init_phy
(
struct
net_device
*
net_dev
,
struct
mac_device
*
mac_dev
)
{
return
init_phy
(
net_dev
,
mac_dev
,
adjust_link_void
);
}
static
int
memac_init_phy
(
struct
net_device
*
net_dev
,
static
struct
phy_device
*
memac_init_phy
(
struct
net_device
*
net_dev
,
struct
mac_device
*
mac_dev
)
{
return
init_phy
(
net_dev
,
mac_dev
,
&
adjust_link_memac
);
...
...
drivers/net/ethernet/freescale/fman/mac.h
View file @
73c364e1
...
...
@@ -58,7 +58,8 @@ struct mac_device {
bool
tx_pause_active
;
bool
promisc
;
int
(
*
init_phy
)(
struct
net_device
*
net_dev
,
struct
mac_device
*
mac_dev
);
struct
phy_device
*
(
*
init_phy
)(
struct
net_device
*
net_dev
,
struct
mac_device
*
mac_dev
);
int
(
*
init
)(
struct
mac_device
*
mac_dev
);
int
(
*
start
)(
struct
mac_device
*
mac_dev
);
int
(
*
stop
)(
struct
mac_device
*
mac_dev
);
...
...
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