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
d241f6b4
Commit
d241f6b4
authored
Mar 21, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove debugging printk while probing MAC address.
Unregister netdev on shutdown before iounmapping registers.
parent
a19d03a3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
9 deletions
+31
-9
drivers/net/sunhme.c
drivers/net/sunhme.c
+31
-9
No files found.
drivers/net/sunhme.c
View file @
d241f6b4
...
@@ -2888,7 +2888,6 @@ static int is_quattro_p(struct pci_dev *pdev)
...
@@ -2888,7 +2888,6 @@ static int is_quattro_p(struct pci_dev *pdev)
static
void
find_eth_addr_in_vpd
(
void
*
rom_base
,
int
len
,
int
index
,
unsigned
char
*
dev_addr
)
static
void
find_eth_addr_in_vpd
(
void
*
rom_base
,
int
len
,
int
index
,
unsigned
char
*
dev_addr
)
{
{
int
this_offset
;
int
this_offset
;
int
orig_index
=
index
;
for
(
this_offset
=
0x20
;
this_offset
<
len
;
this_offset
++
)
{
for
(
this_offset
=
0x20
;
this_offset
<
len
;
this_offset
++
)
{
void
*
p
=
rom_base
+
this_offset
;
void
*
p
=
rom_base
+
this_offset
;
...
@@ -2907,11 +2906,6 @@ static void find_eth_addr_in_vpd(void *rom_base, int len, int index, unsigned ch
...
@@ -2907,11 +2906,6 @@ static void find_eth_addr_in_vpd(void *rom_base, int len, int index, unsigned ch
if
(
index
==
0
)
{
if
(
index
==
0
)
{
int
i
;
int
i
;
printk
(
"MAC(%d): [%02x %02x %02x %02x %02x %02x]
\n
"
,
orig_index
,
readb
(
p
+
0
),
readb
(
p
+
1
),
readb
(
p
+
2
),
readb
(
p
+
3
),
readb
(
p
+
4
),
readb
(
p
+
5
));
for
(
i
=
0
;
i
<
6
;
i
++
)
for
(
i
=
0
;
i
<
6
;
i
++
)
dev_addr
[
i
]
=
readb
(
p
+
i
);
dev_addr
[
i
]
=
readb
(
p
+
i
);
break
;
break
;
...
@@ -3274,12 +3268,18 @@ static void __exit happy_meal_cleanup_module(void)
...
@@ -3274,12 +3268,18 @@ static void __exit happy_meal_cleanup_module(void)
while
(
root_happy_dev
)
{
while
(
root_happy_dev
)
{
struct
happy_meal
*
hp
=
root_happy_dev
;
struct
happy_meal
*
hp
=
root_happy_dev
;
struct
happy_meal
*
next
=
root_happy_dev
->
next_module
;
struct
happy_meal
*
next
=
root_happy_dev
->
next_module
;
struct
net_device
*
dev
=
hp
->
dev
;
/* Unregister netdev before unmapping registers as this
* call can end up trying to access those registers.
*/
unregister_netdev
(
dev
);
#ifdef CONFIG_SBUS
#ifdef CONFIG_SBUS
if
(
!
(
hp
->
happy_flags
&
HFLAG_PCI
))
{
if
(
!
(
hp
->
happy_flags
&
HFLAG_PCI
))
{
if
(
hp
->
happy_flags
&
HFLAG_QUATTRO
)
{
if
(
hp
->
happy_flags
&
HFLAG_QUATTRO
)
{
if
(
hp
->
qfe_parent
!=
last_seen_qfe
)
{
if
(
hp
->
qfe_parent
!=
last_seen_qfe
)
{
free_irq
(
hp
->
dev
->
irq
,
hp
->
qfe_parent
);
free_irq
(
dev
->
irq
,
hp
->
qfe_parent
);
last_seen_qfe
=
hp
->
qfe_parent
;
last_seen_qfe
=
hp
->
qfe_parent
;
}
}
}
}
...
@@ -3304,10 +3304,32 @@ static void __exit happy_meal_cleanup_module(void)
...
@@ -3304,10 +3304,32 @@ static void __exit happy_meal_cleanup_module(void)
iounmap
((
void
*
)
hp
->
gregs
);
iounmap
((
void
*
)
hp
->
gregs
);
}
}
#endif
#endif
unregister_netdev
(
hp
->
dev
);
kfree
(
dev
);
kfree
(
hp
->
dev
);
root_happy_dev
=
next
;
root_happy_dev
=
next
;
}
}
/* Now cleanup the quattro lists. */
#ifdef CONFIG_SBUS
while
(
qfe_sbus_list
)
{
struct
quattro
*
qfe
=
qfe_sbus_list
;
struct
quattro
*
next
=
qfe
->
next
;
kfree
(
qfe
);
qfe_sbus_list
=
next
;
}
#endif
#ifdef CONFIG_PCI
while
(
qfe_pci_list
)
{
struct
quattro
*
qfe
=
qfe_pci_list
;
struct
quattro
*
next
=
qfe
->
next
;
kfree
(
qfe
);
qfe_pci_list
=
next
;
}
#endif
}
}
module_init
(
happy_meal_probe
);
module_init
(
happy_meal_probe
);
...
...
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