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
44c7e9f8
Commit
44c7e9f8
authored
Jun 03, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Convert PPC 8xx_io/fec.c away from init_etherdev().
parent
eda60420
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
arch/ppc/8xx_io/fec.c
arch/ppc/8xx_io/fec.c
+11
-11
No files found.
arch/ppc/8xx_io/fec.c
View file @
44c7e9f8
...
...
@@ -1570,7 +1570,7 @@ int __init fec_enet_init(void)
{
struct
net_device
*
dev
;
struct
fec_enet_private
*
fep
;
int
i
,
j
,
k
;
int
i
,
j
,
k
,
err
;
unsigned
char
*
eap
,
*
iap
,
*
ba
;
unsigned
long
mem_addr
;
volatile
cbd_t
*
bdp
;
...
...
@@ -1586,17 +1586,11 @@ int __init fec_enet_init(void)
bd
=
(
bd_t
*
)
__res
;
/* Allocate some private information.
*/
fep
=
(
struct
fec_enet_private
*
)
kmalloc
(
sizeof
(
*
fep
),
GFP_KERNEL
);
if
(
fep
==
NULL
)
dev
=
alloc_etherdev
(
sizeof
(
*
fep
));
if
(
!
dev
)
return
-
ENOMEM
;
__clear_user
(
fep
,
sizeof
(
*
fep
));
/* Create an Ethernet device instance.
*/
dev
=
init_etherdev
(
0
,
0
);
fep
=
dev
->
priv
;
fecp
=
&
(
immap
->
im_cpm
.
cp_fec
);
...
...
@@ -1661,6 +1655,7 @@ int __init fec_enet_init(void)
/* Allocate a page.
*/
ba
=
(
unsigned
char
*
)
consistent_alloc
(
GFP_KERNEL
,
PAGE_SIZE
,
&
mem_addr
);
/* BUG: no check for failure */
/* Initialize the BD for every fragment in the page.
*/
...
...
@@ -1715,7 +1710,6 @@ int __init fec_enet_init(void)
#endif
dev
->
base_addr
=
(
unsigned
long
)
fecp
;
dev
->
priv
=
fep
;
/* The FEC Ethernet specific entries in the device structure. */
dev
->
open
=
fec_enet_open
;
...
...
@@ -1752,6 +1746,12 @@ int __init fec_enet_init(void)
fecp
->
fec_mii_speed
=
0
;
/* turn off MDIO */
#endif
/* CONFIG_USE_MDIO */
err
=
register_netdev
(
dev
);
if
(
err
)
{
kfree
(
dev
);
return
err
;
}
printk
(
"%s: FEC ENET Version 0.2, FEC irq %d"
#ifdef PHY_INTERRUPT
", MII irq %d"
...
...
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