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
e8c0eee9
Commit
e8c0eee9
authored
Jun 26, 2005
by
Jeff Garzik
Committed by
Jeff Garzik
Jun 26, 2005
Browse files
Options
Browse Files
Download
Plain Diff
Merge /spare/repo/netdev-2.6/ branch 'register-netdev'
parents
97f568d8
aef7b83c
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
156 additions
and
228 deletions
+156
-228
drivers/net/3c503.c
drivers/net/3c503.c
+6
-10
drivers/net/3c515.c
drivers/net/3c515.c
+6
-6
drivers/net/3c523.c
drivers/net/3c523.c
+7
-11
drivers/net/ac3200.c
drivers/net/ac3200.c
+9
-10
drivers/net/cs89x0.c
drivers/net/cs89x0.c
+6
-13
drivers/net/e2100.c
drivers/net/e2100.c
+5
-10
drivers/net/eepro.c
drivers/net/eepro.c
+10
-11
drivers/net/eexpress.c
drivers/net/eexpress.c
+5
-7
drivers/net/es3210.c
drivers/net/es3210.c
+6
-10
drivers/net/eth16i.c
drivers/net/eth16i.c
+8
-12
drivers/net/hp-plus.c
drivers/net/hp-plus.c
+5
-10
drivers/net/hp.c
drivers/net/hp.c
+7
-10
drivers/net/hp100.c
drivers/net/hp100.c
+15
-26
drivers/net/isa-skeleton.c
drivers/net/isa-skeleton.c
+10
-10
drivers/net/lance.c
drivers/net/lance.c
+5
-10
drivers/net/lne390.c
drivers/net/lne390.c
+9
-10
drivers/net/ne-h8300.c
drivers/net/ne-h8300.c
+8
-11
drivers/net/ne.c
drivers/net/ne.c
+8
-10
drivers/net/ne2.c
drivers/net/ne2.c
+9
-10
drivers/net/smc-ultra.c
drivers/net/smc-ultra.c
+5
-10
drivers/net/wd.c
drivers/net/wd.c
+7
-11
No files found.
drivers/net/3c503.c
View file @
e8c0eee9
...
...
@@ -171,12 +171,7 @@ struct net_device * __init el2_probe(int unit)
err
=
do_el2_probe
(
dev
);
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
cleanup_card
(
dev
);
out:
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
...
...
@@ -356,6 +351,10 @@ el2_probe1(struct net_device *dev, int ioaddr)
dev
->
poll_controller
=
ei_poll
;
#endif
retval
=
register_netdev
(
dev
);
if
(
retval
)
goto
out1
;
if
(
dev
->
mem_start
)
printk
(
"%s: %s - %dkB RAM, 8kB shared mem window at %#6lx-%#6lx.
\n
"
,
dev
->
name
,
ei_status
.
name
,
(
wordlength
+
1
)
<<
3
,
...
...
@@ -715,12 +714,9 @@ init_module(void)
dev
->
base_addr
=
io
[
this_dev
];
dev
->
mem_end
=
xcvr
[
this_dev
];
/* low 4bits = xcvr sel. */
if
(
do_el2_probe
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
{
dev_el2
[
found
++
]
=
dev
;
continue
;
}
cleanup_card
(
dev
);
}
free_netdev
(
dev
);
printk
(
KERN_WARNING
"3c503.c: No 3c503 card found (i/o = 0x%x).
\n
"
,
io
[
this_dev
]);
break
;
...
...
drivers/net/3c515.c
View file @
e8c0eee9
...
...
@@ -365,7 +365,7 @@ static int nopnp;
#endif
/* __ISAPNP__ */
static
struct
net_device
*
corkscrew_scan
(
int
unit
);
static
void
corkscrew_setup
(
struct
net_device
*
dev
,
int
ioaddr
,
static
int
corkscrew_setup
(
struct
net_device
*
dev
,
int
ioaddr
,
struct
pnp_dev
*
idev
,
int
card_number
);
static
int
corkscrew_open
(
struct
net_device
*
dev
);
static
void
corkscrew_timer
(
unsigned
long
arg
);
...
...
@@ -539,10 +539,9 @@ static struct net_device *corkscrew_scan(int unit)
printk
(
KERN_INFO
"3c515 Resource configuration register %#4.4x, DCR %4.4x.
\n
"
,
inl
(
ioaddr
+
0x2002
),
inw
(
ioaddr
+
0x2000
));
/* irq = inw(ioaddr + 0x2002) & 15; */
/* Use the irq from isapnp */
corkscrew_setup
(
dev
,
ioaddr
,
idev
,
cards_found
++
);
SET_NETDEV_DEV
(
dev
,
&
idev
->
dev
);
pnp_cards
++
;
err
=
register_netdev
(
dev
);
err
=
corkscrew_setup
(
dev
,
ioaddr
,
idev
,
cards_found
++
);
if
(
!
err
)
return
dev
;
cleanup_card
(
dev
);
...
...
@@ -558,8 +557,7 @@ static struct net_device *corkscrew_scan(int unit)
printk
(
KERN_INFO
"3c515 Resource configuration register %#4.4x, DCR %4.4x.
\n
"
,
inl
(
ioaddr
+
0x2002
),
inw
(
ioaddr
+
0x2000
));
corkscrew_setup
(
dev
,
ioaddr
,
NULL
,
cards_found
++
);
err
=
register_netdev
(
dev
);
err
=
corkscrew_setup
(
dev
,
ioaddr
,
NULL
,
cards_found
++
);
if
(
!
err
)
return
dev
;
cleanup_card
(
dev
);
...
...
@@ -568,7 +566,7 @@ static struct net_device *corkscrew_scan(int unit)
return
NULL
;
}
static
void
corkscrew_setup
(
struct
net_device
*
dev
,
int
ioaddr
,
static
int
corkscrew_setup
(
struct
net_device
*
dev
,
int
ioaddr
,
struct
pnp_dev
*
idev
,
int
card_number
)
{
struct
corkscrew_private
*
vp
=
netdev_priv
(
dev
);
...
...
@@ -691,6 +689,8 @@ static void corkscrew_setup(struct net_device *dev, int ioaddr,
dev
->
get_stats
=
&
corkscrew_get_stats
;
dev
->
set_multicast_list
=
&
set_rx_mode
;
dev
->
ethtool_ops
=
&
netdev_ethtool_ops
;
return
register_netdev
(
dev
);
}
...
...
drivers/net/3c523.c
View file @
e8c0eee9
...
...
@@ -572,6 +572,10 @@ static int __init do_elmc_probe(struct net_device *dev)
dev
->
flags
&=~
IFF_MULTICAST
;
/* Multicast doesn't work */
#endif
retval
=
register_netdev
(
dev
);
if
(
retval
)
goto
err_out
;
return
0
;
err_out:
mca_set_adapter_procfn
(
slot
,
NULL
,
NULL
);
...
...
@@ -600,12 +604,7 @@ struct net_device * __init elmc_probe(int unit)
err
=
do_elmc_probe
(
dev
);
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
cleanup_card
(
dev
);
out:
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
...
...
@@ -1288,13 +1287,10 @@ int init_module(void)
dev
->
irq
=
irq
[
this_dev
];
dev
->
base_addr
=
io
[
this_dev
];
if
(
do_elmc_probe
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
{
dev_elmc
[
this_dev
]
=
dev
;
found
++
;
continue
;
}
cleanup_card
(
dev
);
}
free_netdev
(
dev
);
if
(
io
[
this_dev
]
==
0
)
break
;
...
...
drivers/net/ac3200.c
View file @
e8c0eee9
...
...
@@ -146,12 +146,7 @@ struct net_device * __init ac3200_probe(int unit)
err
=
do_ac3200_probe
(
dev
);
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
cleanup_card
(
dev
);
out:
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
...
...
@@ -273,7 +268,14 @@ static int __init ac_probe1(int ioaddr, struct net_device *dev)
dev
->
poll_controller
=
ei_poll
;
#endif
NS8390_init
(
dev
,
0
);
retval
=
register_netdev
(
dev
);
if
(
retval
)
goto
out2
;
return
0
;
out2:
if
(
ei_status
.
reg0
)
iounmap
((
void
*
)
dev
->
mem_start
);
out1:
free_irq
(
dev
->
irq
,
dev
);
out:
...
...
@@ -392,12 +394,9 @@ init_module(void)
dev
->
base_addr
=
io
[
this_dev
];
dev
->
mem_start
=
mem
[
this_dev
];
/* Currently ignored by driver */
if
(
do_ac3200_probe
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
{
dev_ac32
[
found
++
]
=
dev
;
continue
;
}
cleanup_card
(
dev
);
}
free_netdev
(
dev
);
printk
(
KERN_WARNING
"ac3200.c: No ac3200 card found (i/o = 0x%x).
\n
"
,
io
[
this_dev
]);
break
;
...
...
drivers/net/cs89x0.c
View file @
e8c0eee9
...
...
@@ -319,13 +319,7 @@ struct net_device * __init cs89x0_probe(int unit)
}
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
outw
(
PP_ChipID
,
dev
->
base_addr
+
ADD_PORT
);
release_region
(
dev
->
base_addr
,
NETCARD_IO_EXTENT
);
out:
free_netdev
(
dev
);
printk
(
KERN_WARNING
"cs89x0: no cs8900 or cs8920 detected. Be sure to disable PnP with SETUP
\n
"
);
...
...
@@ -735,7 +729,13 @@ printk("PP_addr=0x%x\n", inw(ioaddr + ADD_PORT));
printk
(
"
\n
"
);
if
(
net_debug
)
printk
(
"cs89x0_probe1() successful
\n
"
);
retval
=
register_netdev
(
dev
);
if
(
retval
)
goto
out3
;
return
0
;
out3:
outw
(
PP_ChipID
,
dev
->
base_addr
+
ADD_PORT
);
out2:
release_region
(
ioaddr
&
~
3
,
NETCARD_IO_EXTENT
);
out1:
...
...
@@ -1831,13 +1831,6 @@ init_module(void)
if
(
ret
)
goto
out
;
if
(
register_netdev
(
dev
)
!=
0
)
{
printk
(
KERN_ERR
"cs89x0.c: No card found at 0x%x
\n
"
,
io
);
ret
=
-
ENXIO
;
outw
(
PP_ChipID
,
dev
->
base_addr
+
ADD_PORT
);
release_region
(
dev
->
base_addr
,
NETCARD_IO_EXTENT
);
goto
out
;
}
dev_cs89x0
=
dev
;
return
0
;
out:
...
...
drivers/net/e2100.c
View file @
e8c0eee9
...
...
@@ -162,12 +162,7 @@ struct net_device * __init e2100_probe(int unit)
err
=
do_e2100_probe
(
dev
);
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
cleanup_card
(
dev
);
out:
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
...
...
@@ -286,6 +281,9 @@ static int __init e21_probe1(struct net_device *dev, int ioaddr)
#endif
NS8390_init
(
dev
,
0
);
retval
=
register_netdev
(
dev
);
if
(
retval
)
goto
out
;
return
0
;
out:
release_region
(
ioaddr
,
E21_IO_EXTENT
);
...
...
@@ -453,12 +451,9 @@ init_module(void)
dev
->
mem_start
=
mem
[
this_dev
];
dev
->
mem_end
=
xcvr
[
this_dev
];
/* low 4bits = xcvr sel. */
if
(
do_e2100_probe
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
{
dev_e21
[
found
++
]
=
dev
;
continue
;
}
cleanup_card
(
dev
);
}
free_netdev
(
dev
);
printk
(
KERN_WARNING
"e2100.c: No E2100 card found (i/o = 0x%x).
\n
"
,
io
[
this_dev
]);
break
;
...
...
drivers/net/eepro.c
View file @
e8c0eee9
...
...
@@ -600,12 +600,7 @@ struct net_device * __init eepro_probe(int unit)
err
=
do_eepro_probe
(
dev
);
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
release_region
(
dev
->
base_addr
,
EEPRO_IO_EXTENT
);
out:
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
...
...
@@ -758,6 +753,7 @@ static int __init eepro_probe1(struct net_device *dev, int autoprobe)
int
i
;
struct
eepro_local
*
lp
;
int
ioaddr
=
dev
->
base_addr
;
int
err
;
/* Grab the region so we can find another board if autoIRQ fails. */
if
(
!
request_region
(
ioaddr
,
EEPRO_IO_EXTENT
,
DRV_NAME
))
{
...
...
@@ -873,10 +869,16 @@ static int __init eepro_probe1(struct net_device *dev, int autoprobe)
/* reset 82595 */
eepro_reset
(
ioaddr
);
err
=
register_netdev
(
dev
);
if
(
err
)
goto
err
;
return
0
;
exit:
err
=
-
ENODEV
;
err:
release_region
(
dev
->
base_addr
,
EEPRO_IO_EXTENT
);
return
-
ENODEV
;
return
err
;
}
/* Open/initialize the board. This is called (in the current kernel)
...
...
@@ -1834,12 +1836,9 @@ init_module(void)
dev
->
irq
=
irq
[
i
];
if
(
do_eepro_probe
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
{
dev_eepro
[
n_eepro
++
]
=
dev
;
continue
;
}
release_region
(
dev
->
base_addr
,
EEPRO_IO_EXTENT
);
}
free_netdev
(
dev
);
break
;
}
...
...
drivers/net/eexpress.c
View file @
e8c0eee9
...
...
@@ -436,11 +436,8 @@ struct net_device * __init express_probe(int unit)
netdev_boot_setup_check
(
dev
);
err
=
do_express_probe
(
dev
);
if
(
!
err
)
{
err
=
register_netdev
(
dev
);
if
(
!
err
)
return
dev
;
}
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
}
...
...
@@ -1205,7 +1202,8 @@ static int __init eexp_hw_probe(struct net_device *dev, unsigned short ioaddr)
dev
->
set_multicast_list
=
&
eexp_set_multicast
;
dev
->
tx_timeout
=
eexp_timeout
;
dev
->
watchdog_timeo
=
2
*
HZ
;
return
0
;
return
register_netdev
(
dev
);
}
/*
...
...
@@ -1716,7 +1714,7 @@ int init_module(void)
break
;
printk
(
KERN_NOTICE
"eexpress.c: Module autoprobe not recommended, give io=xx.
\n
"
);
}
if
(
do_express_probe
(
dev
)
==
0
&&
register_netdev
(
dev
)
==
0
)
{
if
(
do_express_probe
(
dev
)
==
0
)
{
dev_eexp
[
this_dev
]
=
dev
;
found
++
;
continue
;
...
...
drivers/net/es3210.c
View file @
e8c0eee9
...
...
@@ -177,12 +177,7 @@ struct net_device * __init es_probe(int unit)
err
=
do_es_probe
(
dev
);
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
cleanup_card
(
dev
);
out:
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
...
...
@@ -310,6 +305,10 @@ static int __init es_probe1(struct net_device *dev, int ioaddr)
dev
->
poll_controller
=
ei_poll
;
#endif
NS8390_init
(
dev
,
0
);
retval
=
register_netdev
(
dev
);
if
(
retval
)
goto
out1
;
return
0
;
out1:
free_irq
(
dev
->
irq
,
dev
);
...
...
@@ -445,12 +444,9 @@ init_module(void)
dev
->
base_addr
=
io
[
this_dev
];
dev
->
mem_start
=
mem
[
this_dev
];
if
(
do_es_probe
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
{
dev_es3210
[
found
++
]
=
dev
;
continue
;
}
cleanup_card
(
dev
);
}
free_netdev
(
dev
);
printk
(
KERN_WARNING
"es3210.c: No es3210 card found (i/o = 0x%x).
\n
"
,
io
[
this_dev
]);
break
;
...
...
drivers/net/eth16i.c
View file @
e8c0eee9
...
...
@@ -473,13 +473,7 @@ struct net_device * __init eth16i_probe(int unit)
err
=
do_eth16i_probe
(
dev
);
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
free_irq
(
dev
->
irq
,
dev
);
release_region
(
dev
->
base_addr
,
ETH16I_IO_EXTENT
);
out:
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
...
...
@@ -569,7 +563,13 @@ static int __init eth16i_probe1(struct net_device *dev, int ioaddr)
dev
->
tx_timeout
=
eth16i_timeout
;
dev
->
watchdog_timeo
=
TX_TIMEOUT
;
spin_lock_init
(
&
lp
->
lock
);
retval
=
register_netdev
(
dev
);
if
(
retval
)
goto
out1
;
return
0
;
out1:
free_irq
(
dev
->
irq
,
dev
);
out:
release_region
(
ioaddr
,
ETH16I_IO_EXTENT
);
return
retval
;
...
...
@@ -1462,13 +1462,9 @@ int init_module(void)
}
if
(
do_eth16i_probe
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
{
dev_eth16i
[
found
++
]
=
dev
;
continue
;
}
free_irq
(
dev
->
irq
,
dev
);
release_region
(
dev
->
base_addr
,
ETH16I_IO_EXTENT
);
}
printk
(
KERN_WARNING
"eth16i.c No Eth16i card found (i/o = 0x%x).
\n
"
,
io
[
this_dev
]);
free_netdev
(
dev
);
...
...
drivers/net/hp-plus.c
View file @
e8c0eee9
...
...
@@ -159,12 +159,7 @@ struct net_device * __init hp_plus_probe(int unit)
err
=
do_hpp_probe
(
dev
);
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
cleanup_card
(
dev
);
out:
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
...
...
@@ -271,6 +266,9 @@ static int __init hpp_probe1(struct net_device *dev, int ioaddr)
/* Leave the 8390 and HP chip reset. */
outw
(
inw
(
ioaddr
+
HPP_OPTION
)
&
~
EnableIRQ
,
ioaddr
+
HPP_OPTION
);
retval
=
register_netdev
(
dev
);
if
(
retval
)
goto
out
;
return
0
;
out:
release_region
(
ioaddr
,
HP_IO_EXTENT
);
...
...
@@ -463,12 +461,9 @@ init_module(void)
dev
->
irq
=
irq
[
this_dev
];
dev
->
base_addr
=
io
[
this_dev
];
if
(
do_hpp_probe
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
{
dev_hpp
[
found
++
]
=
dev
;
continue
;
}
cleanup_card
(
dev
);
}
free_netdev
(
dev
);
printk
(
KERN_WARNING
"hp-plus.c: No HP-Plus card found (i/o = 0x%x).
\n
"
,
io
[
this_dev
]);
break
;
...
...
drivers/net/hp.c
View file @
e8c0eee9
...
...
@@ -123,12 +123,7 @@ struct net_device * __init hp_probe(int unit)
err
=
do_hp_probe
(
dev
);
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
cleanup_card
(
dev
);
out:
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
...
...
@@ -227,7 +222,12 @@ static int __init hp_probe1(struct net_device *dev, int ioaddr)
ei_status
.
block_output
=
&
hp_block_output
;
hp_init_card
(
dev
);
retval
=
register_netdev
(
dev
);
if
(
retval
)
goto
out1
;
return
0
;
out1:
free_irq
(
dev
->
irq
,
dev
);
out:
release_region
(
ioaddr
,
HP_IO_EXTENT
);
return
retval
;
...
...
@@ -432,12 +432,9 @@ init_module(void)
dev
->
irq
=
irq
[
this_dev
];
dev
->
base_addr
=
io
[
this_dev
];
if
(
do_hp_probe
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
{
dev_hp
[
found
++
]
=
dev
;
continue
;
}
cleanup_card
(
dev
);
}
free_netdev
(
dev
);
printk
(
KERN_WARNING
"hp.c: No HP card found (i/o = 0x%x).
\n
"
,
io
[
this_dev
]);
break
;
...
...
drivers/net/hp100.c
View file @
e8c0eee9
...
...
@@ -417,12 +417,7 @@ struct net_device * __init hp100_probe(int unit)
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
release_region
(
dev
->
base_addr
,
HP100_REGION_SIZE
);
out:
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
...
...
@@ -776,11 +771,22 @@ static int __devinit hp100_probe1(struct net_device *dev, int ioaddr,
printk
(
"Warning! Link down.
\n
"
);
}
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out3
;
return
0
;
out3:
if
(
local_mode
==
1
)
pci_free_consistent
(
lp
->
pci_dev
,
MAX_RINGSIZE
+
0x0f
,
lp
->
page_vaddr_algn
,
virt_to_whatever
(
dev
,
lp
->
page_vaddr_algn
));
if
(
mem_ptr_virt
)
iounmap
(
mem_ptr_virt
);
out2:
release_region
(
ioaddr
,
HP100_REGION_SIZE
);
out1:
return
-
ENODEV
;
return
err
;
}
/* This procedure puts the card into a stable init state */
...
...
@@ -2875,18 +2881,12 @@ static int __init hp100_eisa_probe (struct device *gendev)
if
(
err
)
goto
out1
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out2
;
#ifdef HP100_DEBUG
printk
(
"hp100: %s: EISA adapter found at 0x%x
\n
"
,
dev
->
name
,
dev
->
base_addr
);
#endif
gendev
->
driver_data
=
dev
;
return
0
;
out2:
release_region
(
dev
->
base_addr
,
HP100_REGION_SIZE
);
out1:
free_netdev
(
dev
);
return
err
;
...
...
@@ -2951,17 +2951,12 @@ static int __devinit hp100_pci_probe (struct pci_dev *pdev,
err
=
hp100_probe1
(
dev
,
ioaddr
,
HP100_BUS_PCI
,
pdev
);
if
(
err
)
goto
out1
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out2
;
#ifdef HP100_DEBUG
printk
(
"hp100: %s: PCI adapter found at 0x%x
\n
"
,
dev
->
name
,
ioaddr
);
#endif
pci_set_drvdata
(
pdev
,
dev
);
return
0
;
out2:
release_region
(
dev
->
base_addr
,
HP100_REGION_SIZE
);
out1:
free_netdev
(
dev
);
out0:
...
...
@@ -3032,15 +3027,9 @@ static int __init hp100_isa_init(void)
SET_MODULE_OWNER
(
dev
);
err
=
hp100_isa_probe
(
dev
,
hp100_port
[
i
]);
if
(
!
err
)
{
err
=
register_netdev
(
dev
);
if
(
!
err
)
hp100_devlist
[
cards
++
]
=
dev
;
else
release_region
(
dev
->
base_addr
,
HP100_REGION_SIZE
);
}
if
(
err
)
free_netdev
(
dev
);
}
...
...
drivers/net/isa-skeleton.c
View file @
e8c0eee9
...
...
@@ -176,12 +176,7 @@ struct net_device * __init netcard_probe(int unit)
err
=
do_netcard_probe
(
dev
);
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
cleanup_card
(
dev
);
out:
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
...
...
@@ -316,7 +311,15 @@ static int __init netcard_probe1(struct net_device *dev, int ioaddr)
dev
->
tx_timeout
=
&
net_tx_timeout
;
dev
->
watchdog_timeo
=
MY_TX_TIMEOUT
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out2
;
return
0
;
out2:
#ifdef jumpered_dma
free_dma
(
dev
->
dma
);
#endif
out1:
#ifdef jumpered_interrupts
free_irq
(
dev
->
irq
,
dev
);
...
...
@@ -691,12 +694,9 @@ int init_module(void)
dev
->
dma
=
dma
;
dev
->
mem_start
=
mem
;
if
(
do_netcard_probe
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
this_device
=
dev
;
return
0
;
}
cleanup_card
(
dev
);
}
free_netdev
(
dev
);
return
-
ENXIO
;
}
...
...
drivers/net/lance.c
View file @
e8c0eee9
...
...
@@ -356,12 +356,9 @@ int init_module(void)
dev
->
base_addr
=
io
[
this_dev
];
dev
->
dma
=
dma
[
this_dev
];
if
(
do_lance_probe
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
{
dev_lance
[
found
++
]
=
dev
;
continue
;
}
cleanup_card
(
dev
);
}
free_netdev
(
dev
);
break
;
}
...
...
@@ -448,12 +445,7 @@ struct net_device * __init lance_probe(int unit)
err
=
do_lance_probe
(
dev
);
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
cleanup_card
(
dev
);
out:
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
...
...
@@ -724,6 +716,9 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int
dev
->
tx_timeout
=
lance_tx_timeout
;
dev
->
watchdog_timeo
=
TX_TIMEOUT
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out_dma
;
return
0
;
out_dma:
if
(
dev
->
dma
!=
4
)
...
...
drivers/net/lne390.c
View file @
e8c0eee9
...
...
@@ -167,12 +167,7 @@ struct net_device * __init lne390_probe(int unit)
err
=
do_lne390_probe
(
dev
);
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
cleanup_card
(
dev
);
out:
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
...
...
@@ -296,7 +291,14 @@ static int __init lne390_probe1(struct net_device *dev, int ioaddr)
dev
->
poll_controller
=
ei_poll
;
#endif
NS8390_init
(
dev
,
0
);
ret
=
register_netdev
(
dev
);
if
(
ret
)
goto
unmap
;
return
0
;
unmap:
if
(
ei_status
.
reg0
)
iounmap
((
void
*
)
dev
->
mem_start
);
cleanup:
free_irq
(
dev
->
irq
,
dev
);
return
ret
;
...
...
@@ -426,12 +428,9 @@ int init_module(void)
dev
->
base_addr
=
io
[
this_dev
];
dev
->
mem_start
=
mem
[
this_dev
];
if
(
do_lne390_probe
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
{
dev_lne
[
found
++
]
=
dev
;
continue
;
}
cleanup_card
(
dev
);
}
free_netdev
(
dev
);
printk
(
KERN_WARNING
"lne390.c: No LNE390 card found (i/o = 0x%x).
\n
"
,
io
[
this_dev
]);
break
;
...
...
drivers/net/ne-h8300.c
View file @
e8c0eee9
...
...
@@ -180,12 +180,7 @@ struct net_device * __init ne_probe(int unit)
err
=
do_ne_probe
(
dev
);
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
cleanup_card
(
dev
);
out:
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
...
...
@@ -325,8 +320,13 @@ static int __init ne_probe1(struct net_device *dev, int ioaddr)
dev
->
poll_controller
=
ei_poll
;
#endif
NS8390_init
(
dev
,
0
);
return
0
;
ret
=
register_netdev
(
dev
);
if
(
ret
)
goto
out_irq
;
return
0
;
out_irq:
free_irq
(
dev
->
irq
,
dev
);
err_out:
release_region
(
ioaddr
,
NE_IO_EXTENT
);
return
ret
;
...
...
@@ -633,12 +633,9 @@ int init_module(void)
err
=
init_reg_offset
(
dev
,
dev
->
base_addr
);
if
(
!
err
)
{
if
(
do_ne_probe
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
{
dev_ne
[
found
++
]
=
dev
;
continue
;
}
cleanup_card
(
dev
);
}
}
free_netdev
(
dev
);
if
(
found
)
...
...
drivers/net/ne.c
View file @
e8c0eee9
...
...
@@ -229,12 +229,7 @@ struct net_device * __init ne_probe(int unit)
err
=
do_ne_probe
(
dev
);
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
cleanup_card
(
dev
);
out:
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
...
...
@@ -534,8 +529,14 @@ static int __init ne_probe1(struct net_device *dev, int ioaddr)
dev
->
poll_controller
=
ei_poll
;
#endif
NS8390_init
(
dev
,
0
);
ret
=
register_netdev
(
dev
);
if
(
ret
)
goto
out_irq
;
return
0
;
out_irq:
free_irq
(
dev
->
irq
,
dev
);
err_out:
release_region
(
ioaddr
,
NE_IO_EXTENT
);
return
ret
;
...
...
@@ -826,12 +827,9 @@ int init_module(void)
dev
->
mem_end
=
bad
[
this_dev
];
dev
->
base_addr
=
io
[
this_dev
];
if
(
do_ne_probe
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
{
dev_ne
[
found
++
]
=
dev
;
continue
;
}
cleanup_card
(
dev
);
}
free_netdev
(
dev
);
if
(
found
)
break
;
...
...
drivers/net/ne2.c
View file @
e8c0eee9
...
...
@@ -301,12 +301,7 @@ struct net_device * __init ne2_probe(int unit)
err
=
do_ne2_probe
(
dev
);
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
cleanup_card
(
dev
);
out:
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
...
...
@@ -517,7 +512,14 @@ static int __init ne2_probe1(struct net_device *dev, int slot)
dev
->
poll_controller
=
ei_poll
;
#endif
NS8390_init
(
dev
,
0
);
retval
=
register_netdev
(
dev
);
if
(
retval
)
goto
out1
;
return
0
;
out1:
mca_set_adapter_procfn
(
ei_status
.
priv
,
NULL
,
NULL
);
free_irq
(
dev
->
irq
,
dev
);
out:
release_region
(
base_addr
,
NE_IO_EXTENT
);
return
retval
;
...
...
@@ -798,12 +800,9 @@ int init_module(void)
dev
->
mem_end
=
bad
[
this_dev
];
dev
->
base_addr
=
io
[
this_dev
];
if
(
do_ne2_probe
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
{
dev_ne
[
found
++
]
=
dev
;
continue
;
}
cleanup_card
(
dev
);
}
free_netdev
(
dev
);
break
;
}
...
...
drivers/net/smc-ultra.c
View file @
e8c0eee9
...
...
@@ -194,12 +194,7 @@ struct net_device * __init ultra_probe(int unit)
err
=
do_ultra_probe
(
dev
);
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
cleanup_card
(
dev
);
out:
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
...
...
@@ -325,6 +320,9 @@ static int __init ultra_probe1(struct net_device *dev, int ioaddr)
#endif
NS8390_init
(
dev
,
0
);
retval
=
register_netdev
(
dev
);
if
(
retval
)
goto
out
;
return
0
;
out:
release_region
(
ioaddr
,
ULTRA_IO_EXTENT
);
...
...
@@ -583,12 +581,9 @@ init_module(void)
dev
->
irq
=
irq
[
this_dev
];
dev
->
base_addr
=
io
[
this_dev
];
if
(
do_ultra_probe
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
{
dev_ultra
[
found
++
]
=
dev
;
continue
;
}
cleanup_card
(
dev
);
}
free_netdev
(
dev
);
printk
(
KERN_WARNING
"smc-ultra.c: No SMC Ultra card found (i/o = 0x%x).
\n
"
,
io
[
this_dev
]);
break
;
...
...
drivers/net/wd.c
View file @
e8c0eee9
...
...
@@ -149,12 +149,7 @@ struct net_device * __init wd_probe(int unit)
err
=
do_wd_probe
(
dev
);
if
(
err
)
goto
out
;
err
=
register_netdev
(
dev
);
if
(
err
)
goto
out1
;
return
dev
;
out1:
cleanup_card
(
dev
);
out:
free_netdev
(
dev
);
return
ERR_PTR
(
err
);
...
...
@@ -164,6 +159,7 @@ struct net_device * __init wd_probe(int unit)
static
int
__init
wd_probe1
(
struct
net_device
*
dev
,
int
ioaddr
)
{
int
i
;
int
err
;
int
checksum
=
0
;
int
ancient
=
0
;
/* An old card without config registers. */
int
word16
=
0
;
/* 0 = 8 bit, 1 = 16 bit */
...
...
@@ -356,7 +352,10 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr)
outb
(
inb
(
ioaddr
+
4
)
|
0x80
,
ioaddr
+
4
);
#endif
return
0
;
err
=
register_netdev
(
dev
);
if
(
err
)
free_irq
(
dev
->
irq
,
dev
);
return
err
;
}
static
int
...
...
@@ -527,12 +526,9 @@ init_module(void)
dev
->
mem_start
=
mem
[
this_dev
];
dev
->
mem_end
=
mem_end
[
this_dev
];
if
(
do_wd_probe
(
dev
)
==
0
)
{
if
(
register_netdev
(
dev
)
==
0
)
{
dev_wd
[
found
++
]
=
dev
;
continue
;
}
cleanup_card
(
dev
);
}
free_netdev
(
dev
);
printk
(
KERN_WARNING
"wd.c: No wd80x3 card found (i/o = 0x%x).
\n
"
,
io
[
this_dev
]);
break
;
...
...
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