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
eda60420
Commit
eda60420
authored
Jun 03, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Convert PPC 8xx_io/enet.c away from init_etherdev().
parent
86fa60e5
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/enet.c
arch/ppc/8xx_io/enet.c
+11
-11
No files found.
arch/ppc/8xx_io/enet.c
View file @
eda60420
...
@@ -643,7 +643,7 @@ int __init scc_enet_init(void)
...
@@ -643,7 +643,7 @@ int __init scc_enet_init(void)
{
{
struct
net_device
*
dev
;
struct
net_device
*
dev
;
struct
scc_enet_private
*
cep
;
struct
scc_enet_private
*
cep
;
int
i
,
j
,
k
;
int
i
,
j
,
k
,
err
;
unsigned
char
*
eap
,
*
ba
;
unsigned
char
*
eap
,
*
ba
;
dma_addr_t
mem_addr
;
dma_addr_t
mem_addr
;
bd_t
*
bd
;
bd_t
*
bd
;
...
@@ -659,19 +659,13 @@ int __init scc_enet_init(void)
...
@@ -659,19 +659,13 @@ int __init scc_enet_init(void)
bd
=
(
bd_t
*
)
__res
;
bd
=
(
bd_t
*
)
__res
;
/* Allocate some private information.
dev
=
alloc_etherdev
(
sizeof
(
*
cep
));
*/
if
(
!
dev
)
cep
=
(
struct
scc_enet_private
*
)
kmalloc
(
sizeof
(
*
cep
),
GFP_KERNEL
);
if
(
cep
==
NULL
)
return
-
ENOMEM
;
return
-
ENOMEM
;
__clear_user
(
cep
,
sizeof
(
*
cep
))
;
cep
=
dev
->
priv
;
spin_lock_init
(
&
cep
->
lock
);
spin_lock_init
(
&
cep
->
lock
);
/* Create an Ethernet device instance.
*/
dev
=
init_etherdev
(
0
,
0
);
/* Get pointer to SCC area in parameter RAM.
/* Get pointer to SCC area in parameter RAM.
*/
*/
ep
=
(
scc_enet_t
*
)(
&
cp
->
cp_dparam
[
PROFF_ENET
]);
ep
=
(
scc_enet_t
*
)(
&
cp
->
cp_dparam
[
PROFF_ENET
]);
...
@@ -841,6 +835,7 @@ int __init scc_enet_init(void)
...
@@ -841,6 +835,7 @@ int __init scc_enet_init(void)
/* Allocate a page.
/* Allocate a page.
*/
*/
ba
=
(
unsigned
char
*
)
consistent_alloc
(
GFP_KERNEL
,
PAGE_SIZE
,
&
mem_addr
);
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.
/* Initialize the BD for every fragment in the page.
*/
*/
...
@@ -939,7 +934,6 @@ int __init scc_enet_init(void)
...
@@ -939,7 +934,6 @@ int __init scc_enet_init(void)
#endif
#endif
dev
->
base_addr
=
(
unsigned
long
)
ep
;
dev
->
base_addr
=
(
unsigned
long
)
ep
;
dev
->
priv
=
cep
;
#if 0
#if 0
dev->name = "CPM_ENET";
dev->name = "CPM_ENET";
#endif
#endif
...
@@ -953,6 +947,12 @@ int __init scc_enet_init(void)
...
@@ -953,6 +947,12 @@ int __init scc_enet_init(void)
dev
->
get_stats
=
scc_enet_get_stats
;
dev
->
get_stats
=
scc_enet_get_stats
;
dev
->
set_multicast_list
=
set_multicast_list
;
dev
->
set_multicast_list
=
set_multicast_list
;
err
=
register_netdev
(
dev
);
if
(
err
)
{
kfree
(
dev
);
return
err
;
}
/* And last, enable the transmit and receive processing.
/* And last, enable the transmit and receive processing.
*/
*/
sccp
->
scc_gsmrl
|=
(
SCC_GSMRL_ENR
|
SCC_GSMRL_ENT
);
sccp
->
scc_gsmrl
|=
(
SCC_GSMRL_ENR
|
SCC_GSMRL_ENT
);
...
...
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