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
6c191c7d
Commit
6c191c7d
authored
Jan 10, 2004
by
Jeff Garzik
Committed by
Stephen Hemminger
Jan 10, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cset exclude: shemminger@osdl.org|ChangeSet|20040110194048|37013
Revert skfp_probe patch... better patch coming.
parent
a338e5ad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
drivers/net/skfp/skfddi.c
drivers/net/skfp/skfddi.c
+13
-7
No files found.
drivers/net/skfp/skfddi.c
View file @
6c191c7d
...
...
@@ -106,9 +106,14 @@ static const char *boot_msg =
#include "h/smtstate.h"
// Define global routines
int
skfp_probe
(
struct
net_device
*
dev
);
// Define module-wide (static) routines
static
struct
net_device
*
alloc_device
(
struct
net_device
*
dev
,
u_long
iobase
);
static
struct
net_device
*
insert_device
(
struct
net_device
*
dev
);
static
struct
net_device
*
insert_device
(
struct
net_device
*
dev
,
int
(
*
init
)
(
struct
net_device
*
));
static
int
fddi_dev_index
(
unsigned
char
*
s
);
static
void
init_dev
(
struct
net_device
*
dev
,
u_long
iobase
);
static
void
link_modules
(
struct
net_device
*
dev
,
struct
net_device
*
tmp
);
...
...
@@ -254,7 +259,7 @@ static int loading_module;
* initialized and the board resources are read and stored in
* the device structure.
*/
static
int
skfp_probe
(
struct
net_device
*
dev
)
int
skfp_probe
(
struct
net_device
*
dev
)
{
int
i
;
/* used in for loops */
struct
pci_dev
*
pdev
=
NULL
;
/* PCI device structure */
...
...
@@ -448,7 +453,7 @@ static struct net_device *alloc_device(struct net_device *dev, u_long iobase)
num_fddi
=
fddi_dev_index
(
dev
->
name
);
if
(
loading_module
)
{
num_fddi
++
;
dev
=
insert_device
(
dev
);
dev
=
insert_device
(
dev
,
skfp_probe
);
return
dev
;
}
while
(
1
)
{
...
...
@@ -479,7 +484,7 @@ static struct net_device *alloc_device(struct net_device *dev, u_long iobase)
(
dev
->
base_addr
!=
0
))
&&
!
fixed
)
||
new_dev
)
{
num_fddi
++
;
/* New device */
dev
=
insert_device
(
dev
);
dev
=
insert_device
(
dev
,
skfp_probe
);
}
if
(
dev
)
{
if
(
!
dev
->
priv
)
{
...
...
@@ -545,7 +550,8 @@ static void init_dev(struct net_device *dev, u_long iobase)
* one up. If memory could not be allocated, print an error message.
*
************************/
static
struct
net_device
*
insert_device
(
struct
net_device
*
dev
)
static
struct
net_device
*
insert_device
(
struct
net_device
*
dev
,
int
(
*
init
)
(
struct
net_device
*
))
{
struct
net_device
*
new
;
int
len
;
...
...
@@ -560,7 +566,7 @@ static struct net_device *insert_device(struct net_device *dev)
}
else
{
memset
((
char
*
)
new
,
0
,
len
);
new
->
priv
=
(
struct
s_smc
*
)
(
new
+
1
);
new
->
init
=
skfp_probe
;
new
->
init
=
init
;
/* initialisation routine */
if
(
!
loading_module
)
{
new
->
next
=
dev
->
next
;
dev
->
next
=
new
;
...
...
@@ -2539,7 +2545,7 @@ static int __init skfd_init(void)
{
struct
net_device
*
p
;
if
((
mdev
=
insert_device
(
NULL
))
==
NULL
)
if
((
mdev
=
insert_device
(
NULL
,
skfp_probe
))
==
NULL
)
return
-
ENOMEM
;
for
(
p
=
mdev
;
p
!=
NULL
;
p
=
((
struct
s_smc
*
)
p
->
priv
)
->
os
.
next_module
)
{
...
...
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