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
d93ce100
Commit
d93ce100
authored
Nov 25, 2002
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] region handling cleanups for appletalk ltpc
parent
7b3cbc4a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
8 deletions
+21
-8
drivers/net/appletalk/ltpc.c
drivers/net/appletalk/ltpc.c
+21
-8
No files found.
drivers/net/appletalk/ltpc.c
View file @
d93ce100
...
...
@@ -1059,26 +1059,39 @@ int __init ltpc_probe(struct net_device *dev)
int
autoirq
;
unsigned
long
flags
;
unsigned
long
f
;
int
portfound
=
0
;
SET_MODULE_OWNER
(
dev
);
save_flags
(
flags
);
/* probe for the I/O port address */
if
(
io
!=
0x240
&&
!
check_region
(
0x220
,
8
))
{
if
(
io
!=
0x240
&&
request_region
(
0x220
,
8
,
"ltpc"
))
{
x
=
inb_p
(
0x220
+
6
);
if
(
(
x
!=
0xff
)
&&
(
x
>=
0xf0
)
)
io
=
0x220
;
if
(
(
x
!=
0xff
)
&&
(
x
>=
0xf0
)
)
{
io
=
0x220
;
portfound
=
1
;
}
else
{
release_region
(
0x220
,
8
);
}
}
if
(
io
!=
0x220
&&
!
check_region
(
0x240
,
8
))
{
if
(
io
!=
0x220
&&
request_region
(
0x240
,
8
,
"ltpc"
))
{
y
=
inb_p
(
0x240
+
6
);
if
(
(
y
!=
0xff
)
&&
(
y
>=
0xf0
)
)
io
=
0x240
;
if
(
(
y
!=
0xff
)
&&
(
y
>=
0xf0
)
){
io
=
0x240
;
portfound
=
1
;
}
else
{
release_region
(
0x240
,
8
);
}
}
if
(
io
)
{
/* found it, now grab it */
request_region
(
io
,
8
,
"ltpc"
);
}
else
{
if
(
io
&&
!
portfound
&&
request_region
(
io
,
8
,
"ltpc"
))
{
portfound
=
1
;
}
if
(
!
portfound
)
{
/* give up in despair */
printk
(
"LocalTalk card not found; 220 = %02x, 240 = %02x.
\n
"
,
x
,
y
);
...
...
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