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
566b6ef3
Commit
566b6ef3
authored
Mar 31, 2004
by
Len Brown
Committed by
Len Brown
Mar 31, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ACPI] PCI bridge interrupt fix (David Shaohua Li)
http://bugzilla.kernel.org/show_bug.cgi?id=2409
parent
78219929
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
+17
-14
drivers/acpi/pci_irq.c
drivers/acpi/pci_irq.c
+17
-14
No files found.
drivers/acpi/pci_irq.c
View file @
566b6ef3
...
@@ -273,11 +273,6 @@ acpi_pci_irq_lookup (struct pci_bus *bus, int device, int pin)
...
@@ -273,11 +273,6 @@ acpi_pci_irq_lookup (struct pci_bus *bus, int device, int pin)
return_VALUE
(
entry
->
irq
);
return_VALUE
(
entry
->
irq
);
}
}
/*
* current thinking is that acpi_pci_irq_derive() adds no value
* and should be deleted, so warn if it actually does something.
*/
static
int
static
int
acpi_pci_irq_derive
(
acpi_pci_irq_derive
(
struct
pci_dev
*
dev
,
struct
pci_dev
*
dev
,
...
@@ -285,6 +280,7 @@ acpi_pci_irq_derive (
...
@@ -285,6 +280,7 @@ acpi_pci_irq_derive (
{
{
struct
pci_dev
*
bridge
=
dev
;
struct
pci_dev
*
bridge
=
dev
;
int
irq
=
0
;
int
irq
=
0
;
u8
bridge_pin
=
0
;
ACPI_FUNCTION_TRACE
(
"acpi_pci_irq_derive"
);
ACPI_FUNCTION_TRACE
(
"acpi_pci_irq_derive"
);
...
@@ -293,11 +289,25 @@ acpi_pci_irq_derive (
...
@@ -293,11 +289,25 @@ acpi_pci_irq_derive (
/*
/*
* Attempt to derive an IRQ for this device from a parent bridge's
* Attempt to derive an IRQ for this device from a parent bridge's
* PCI interrupt routing entry (
a.k.a. the "bridge swizzle"
).
* PCI interrupt routing entry (
eg. yenta bridge and add-in card bridge
).
*/
*/
while
(
!
irq
&&
bridge
->
bus
->
self
)
{
while
(
!
irq
&&
bridge
->
bus
->
self
)
{
pin
=
(
pin
+
PCI_SLOT
(
bridge
->
devfn
))
%
4
;
pin
=
(
pin
+
PCI_SLOT
(
bridge
->
devfn
))
%
4
;
bridge
=
bridge
->
bus
->
self
;
bridge
=
bridge
->
bus
->
self
;
if
((
bridge
->
class
>>
8
)
==
PCI_CLASS_BRIDGE_CARDBUS
)
{
/* PC card has the same IRQ as its cardbridge */
pci_read_config_byte
(
bridge
,
PCI_INTERRUPT_PIN
,
&
bridge_pin
);
if
(
!
bridge_pin
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"No interrupt pin configured for device %s
\n
"
,
pci_name
(
bridge
)));
return_VALUE
(
0
);
}
/* Pin is from 0 to 3 */
bridge_pin
--
;
pin
=
bridge_pin
;
}
irq
=
acpi_pci_irq_lookup
(
bridge
->
bus
,
irq
=
acpi_pci_irq_lookup
(
bridge
->
bus
,
PCI_SLOT
(
bridge
->
devfn
),
pin
);
PCI_SLOT
(
bridge
->
devfn
),
pin
);
}
}
...
@@ -307,7 +317,7 @@ acpi_pci_irq_derive (
...
@@ -307,7 +317,7 @@ acpi_pci_irq_derive (
return_VALUE
(
0
);
return_VALUE
(
0
);
}
}
ACPI_DEBUG_PRINT
((
ACPI_DB_
WARN
,
"Derive IRQ %d for device %s from %s
\n
"
,
ACPI_DEBUG_PRINT
((
ACPI_DB_
INFO
,
"Derive IRQ %d for device %s from %s
\n
"
,
irq
,
pci_name
(
dev
),
pci_name
(
bridge
)));
irq
,
pci_name
(
dev
),
pci_name
(
bridge
)));
return_VALUE
(
irq
);
return_VALUE
(
irq
);
...
@@ -344,13 +354,6 @@ acpi_pci_irq_enable (
...
@@ -344,13 +354,6 @@ acpi_pci_irq_enable (
*/
*/
irq
=
acpi_pci_irq_lookup
(
dev
->
bus
,
PCI_SLOT
(
dev
->
devfn
),
pin
);
irq
=
acpi_pci_irq_lookup
(
dev
->
bus
,
PCI_SLOT
(
dev
->
devfn
),
pin
);
/*
* Check if the device has an IRQ,
* Hotplug devices may get IRQs by scanning
*/
if
(
!
irq
&&
dev
->
irq
)
irq
=
dev
->
irq
;
/*
/*
* If no PRT entry was found, we'll try to derive an IRQ from the
* If no PRT entry was found, we'll try to derive an IRQ from the
* device's parent bridge.
* device's parent bridge.
...
...
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