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
86f409df
Commit
86f409df
authored
Mar 19, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In sparc64/ebus, handle machines with both RIO and
non-RIO EBUSes correctly.
parent
26b3da0b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
30 deletions
+24
-30
arch/sparc64/kernel/ebus.c
arch/sparc64/kernel/ebus.c
+24
-30
No files found.
arch/sparc64/kernel/ebus.c
View file @
86f409df
...
@@ -275,6 +275,25 @@ void __init fill_ebus_device(int node, struct linux_ebus_device *dev)
...
@@ -275,6 +275,25 @@ void __init fill_ebus_device(int node, struct linux_ebus_device *dev)
printk
(
"]"
);
printk
(
"]"
);
}
}
static
struct
pci_dev
*
find_next_ebus
(
struct
pci_dev
*
start
,
int
*
is_rio_p
)
{
struct
pci_dev
*
pdev
=
start
;
do
{
pdev
=
pci_find_device
(
PCI_VENDOR_ID_SUN
,
PCI_ANY_ID
,
pdev
);
if
(
pdev
&&
(
pdev
->
device
==
PCI_DEVICE_ID_SUN_EBUS
||
pdev
->
device
==
PCI_DEVICE_ID_SUN_RIO_EBUS
))
break
;
}
while
(
pdev
!=
NULL
);
if
(
pdev
&&
(
pdev
->
device
==
PCI_DEVICE_ID_SUN_RIO_EBUS
))
*
is_rio_p
=
1
;
else
*
is_rio_p
=
0
;
return
pdev
;
}
void
__init
ebus_init
(
void
)
void
__init
ebus_init
(
void
)
{
{
...
@@ -289,12 +308,7 @@ void __init ebus_init(void)
...
@@ -289,12 +308,7 @@ void __init ebus_init(void)
if
(
!
pci_present
())
if
(
!
pci_present
())
return
;
return
;
is_rio
=
0
;
pdev
=
find_next_ebus
(
NULL
,
&
is_rio
);
pdev
=
pci_find_device
(
PCI_VENDOR_ID_SUN
,
PCI_DEVICE_ID_SUN_EBUS
,
0
);
if
(
!
pdev
)
{
pdev
=
pci_find_device
(
PCI_VENDOR_ID_SUN
,
PCI_DEVICE_ID_SUN_RIO_EBUS
,
0
);
is_rio
=
1
;
}
if
(
!
pdev
)
{
if
(
!
pdev
)
{
printk
(
"ebus: No EBus's found.
\n
"
);
printk
(
"ebus: No EBus's found.
\n
"
);
return
;
return
;
...
@@ -315,16 +329,7 @@ void __init ebus_init(void)
...
@@ -315,16 +329,7 @@ void __init ebus_init(void)
we'd have to tweak with the ebus_chain
we'd have to tweak with the ebus_chain
in the runtime after initialization. -jj */
in the runtime after initialization. -jj */
if
(
!
prom_getchild
(
ebusnd
))
{
if
(
!
prom_getchild
(
ebusnd
))
{
struct
pci_dev
*
orig_pdev
=
pdev
;
pdev
=
find_next_ebus
(
pdev
,
&
is_rio
);
is_rio
=
0
;
pdev
=
pci_find_device
(
PCI_VENDOR_ID_SUN
,
PCI_DEVICE_ID_SUN_EBUS
,
orig_pdev
);
if
(
!
pdev
)
{
pdev
=
pci_find_device
(
PCI_VENDOR_ID_SUN
,
PCI_DEVICE_ID_SUN_RIO_EBUS
,
orig_pdev
);
is_rio
=
1
;
}
if
(
!
pdev
)
{
if
(
!
pdev
)
{
if
(
ebus
==
ebus_chain
)
{
if
(
ebus
==
ebus_chain
)
{
ebus_chain
=
NULL
;
ebus_chain
=
NULL
;
...
@@ -374,20 +379,9 @@ void __init ebus_init(void)
...
@@ -374,20 +379,9 @@ void __init ebus_init(void)
next_ebus:
next_ebus:
printk
(
"
\n
"
);
printk
(
"
\n
"
);
{
pdev
=
find_next_ebus
(
pdev
,
&
is_rio
);
struct
pci_dev
*
orig_pdev
=
pdev
;
is_rio
=
0
;
pdev
=
pci_find_device
(
PCI_VENDOR_ID_SUN
,
PCI_DEVICE_ID_SUN_EBUS
,
orig_pdev
);
if
(
!
pdev
)
{
pdev
=
pci_find_device
(
PCI_VENDOR_ID_SUN
,
PCI_DEVICE_ID_SUN_RIO_EBUS
,
orig_pdev
);
is_rio
=
1
;
}
if
(
!
pdev
)
if
(
!
pdev
)
break
;
break
;
}
cookie
=
pdev
->
sysdata
;
cookie
=
pdev
->
sysdata
;
ebusnd
=
cookie
->
prom_node
;
ebusnd
=
cookie
->
prom_node
;
...
...
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