Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
41d0ab2a
Commit
41d0ab2a
authored
Sep 09, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
parents
a4531edd
cdb9b9f7
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
64 deletions
+77
-64
drivers/pci/hotplug.c
drivers/pci/hotplug.c
+21
-32
drivers/pci/hotplug/pciehprm_acpi.c
drivers/pci/hotplug/pciehprm_acpi.c
+4
-4
drivers/pci/pci.h
drivers/pci/pci.h
+0
-1
drivers/pci/probe.c
drivers/pci/probe.c
+33
-17
drivers/pci/quirks.c
drivers/pci/quirks.c
+6
-0
include/linux/pci.h
include/linux/pci.h
+13
-10
No files found.
drivers/pci/hotplug.c
View file @
41d0ab2a
...
@@ -20,46 +20,35 @@ int pci_hotplug (struct device *dev, char **envp, int num_envp,
...
@@ -20,46 +20,35 @@ int pci_hotplug (struct device *dev, char **envp, int num_envp,
scratch
=
buffer
;
scratch
=
buffer
;
/* stuff we want to pass to /sbin/hotplug */
envp
[
i
++
]
=
scratch
;
if
(
add_hotplug_env_var
(
envp
,
num_envp
,
&
i
,
length
+=
scnprintf
(
scratch
,
buffer_size
-
length
,
"PCI_CLASS=%04X"
,
buffer
,
buffer_size
,
&
length
,
pdev
->
class
);
"PCI_CLASS=%04X"
,
pdev
->
class
))
if
((
buffer_size
-
length
<=
0
)
||
(
i
>=
num_envp
))
return
-
ENOMEM
;
return
-
ENOMEM
;
++
length
;
scratch
+=
length
;
envp
[
i
++
]
=
scratch
;
if
(
add_hotplug_env_var
(
envp
,
num_envp
,
&
i
,
length
+=
scnprintf
(
scratch
,
buffer_size
-
length
,
"PCI_ID=%04X:%04X"
,
buffer
,
buffer_size
,
&
length
,
pdev
->
vendor
,
pdev
->
device
);
"PCI_ID=%04X:%04X"
,
pdev
->
vendor
,
pdev
->
device
))
if
((
buffer_size
-
length
<=
0
)
||
(
i
>=
num_envp
))
return
-
ENOMEM
;
return
-
ENOMEM
;
++
length
;
scratch
+=
length
;
envp
[
i
++
]
=
scratch
;
if
(
add_hotplug_env_var
(
envp
,
num_envp
,
&
i
,
length
+=
scnprintf
(
scratch
,
buffer_size
-
length
,
buffer
,
buffer_size
,
&
length
,
"PCI_SUBSYS_ID=%04X:%04X"
,
pdev
->
subsystem_vendor
,
"PCI_SUBSYS_ID=%04X:%04X"
,
pdev
->
subsystem_vendor
,
pdev
->
subsystem_device
);
pdev
->
subsystem_device
))
if
((
buffer_size
-
length
<=
0
)
||
(
i
>=
num_envp
))
return
-
ENOMEM
;
return
-
ENOMEM
;
++
length
;
scratch
+=
length
;
envp
[
i
++
]
=
scratch
;
if
(
add_hotplug_env_var
(
envp
,
num_envp
,
&
i
,
length
+=
scnprintf
(
scratch
,
buffer_size
-
length
,
"PCI_SLOT_NAME=%s"
,
buffer
,
buffer_size
,
&
length
,
pci_name
(
pdev
));
"PCI_SLOT_NAME=%s"
,
pci_name
(
pdev
)))
if
((
buffer_size
-
length
<=
0
)
||
(
i
>=
num_envp
))
return
-
ENOMEM
;
return
-
ENOMEM
;
envp
[
i
++
]
=
scratch
;
if
(
add_hotplug_env_var
(
envp
,
num_envp
,
&
i
,
length
+=
scnprintf
(
scratch
,
buffer_size
-
length
,
buffer
,
buffer_size
,
&
length
,
"MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x"
,
"MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x"
,
pdev
->
vendor
,
pdev
->
device
,
pdev
->
vendor
,
pdev
->
device
,
pdev
->
subsystem_vendor
,
pdev
->
subsystem_device
,
pdev
->
subsystem_vendor
,
pdev
->
subsystem_device
,
(
u8
)(
pdev
->
class
>>
16
),
(
u8
)(
pdev
->
class
>>
8
),
(
u8
)(
pdev
->
class
>>
16
),
(
u8
)(
pdev
->
class
>>
8
),
(
u8
)(
pdev
->
class
));
(
u8
)(
pdev
->
class
)))
if
((
buffer_size
-
length
<=
0
)
||
(
i
>=
num_envp
))
return
-
ENOMEM
;
return
-
ENOMEM
;
envp
[
i
]
=
NULL
;
envp
[
i
]
=
NULL
;
...
...
drivers/pci/hotplug/pciehprm_acpi.c
View file @
41d0ab2a
...
@@ -1696,15 +1696,15 @@ void pciehprm_enable_card(
...
@@ -1696,15 +1696,15 @@ void pciehprm_enable_card(
pci_bus
->
number
=
func
->
bus
;
pci_bus
->
number
=
func
->
bus
;
devfn
=
PCI_DEVFN
(
func
->
device
,
func
->
function
);
devfn
=
PCI_DEVFN
(
func
->
device
,
func
->
function
);
rc
=
pci_bus_read_config_word
(
pci_bus
,
devfn
,
PCI_COMMAND
,
&
c
omman
d
);
rc
=
pci_bus_read_config_word
(
pci_bus
,
devfn
,
PCI_COMMAND
,
&
c
m
d
);
if
(
card_type
==
PCI_HEADER_TYPE_BRIDGE
)
{
if
(
card_type
==
PCI_HEADER_TYPE_BRIDGE
)
{
rc
=
pci_bus_read_config_word
(
pci_bus
,
devfn
,
PCI_BRIDGE_CONTROL
,
&
bc
omman
d
);
rc
=
pci_bus_read_config_word
(
pci_bus
,
devfn
,
PCI_BRIDGE_CONTROL
,
&
bc
m
d
);
}
}
c
md
=
command
=
comman
d
|
PCI_COMMAND_MASTER
|
PCI_COMMAND_INVALIDATE
c
ommand
=
cm
d
|
PCI_COMMAND_MASTER
|
PCI_COMMAND_INVALIDATE
|
PCI_COMMAND_IO
|
PCI_COMMAND_MEMORY
;
|
PCI_COMMAND_IO
|
PCI_COMMAND_MEMORY
;
bc
md
=
bcommand
=
bcomman
d
|
PCI_BRIDGE_CTL_NO_ISA
;
bc
ommand
=
bcm
d
|
PCI_BRIDGE_CTL_NO_ISA
;
ab
=
find_acpi_bridge_by_bus
(
acpi_bridges_head
,
ctrl
->
seg
,
ctrl
->
bus
);
ab
=
find_acpi_bridge_by_bus
(
acpi_bridges_head
,
ctrl
->
seg
,
ctrl
->
bus
);
if
(
ab
)
{
if
(
ab
)
{
...
...
drivers/pci/pci.h
View file @
41d0ab2a
...
@@ -29,7 +29,6 @@ static inline int pci_proc_detach_bus(struct pci_bus *bus) { return 0; }
...
@@ -29,7 +29,6 @@ static inline int pci_proc_detach_bus(struct pci_bus *bus) { return 0; }
#endif
#endif
/* Functions for PCI Hotplug drivers to use */
/* Functions for PCI Hotplug drivers to use */
extern
struct
pci_bus
*
pci_add_new_bus
(
struct
pci_bus
*
parent
,
struct
pci_dev
*
dev
,
int
busnr
);
extern
unsigned
int
pci_do_scan_bus
(
struct
pci_bus
*
bus
);
extern
unsigned
int
pci_do_scan_bus
(
struct
pci_bus
*
bus
);
extern
int
pci_remove_device_safe
(
struct
pci_dev
*
dev
);
extern
int
pci_remove_device_safe
(
struct
pci_dev
*
dev
);
extern
unsigned
char
pci_max_busnr
(
void
);
extern
unsigned
char
pci_max_busnr
(
void
);
...
...
drivers/pci/probe.c
View file @
41d0ab2a
...
@@ -753,26 +753,18 @@ pci_scan_device(struct pci_bus *bus, int devfn)
...
@@ -753,26 +753,18 @@ pci_scan_device(struct pci_bus *bus, int devfn)
kfree
(
dev
);
kfree
(
dev
);
return
NULL
;
return
NULL
;
}
}
device_initialize
(
&
dev
->
dev
);
dev
->
dev
.
release
=
pci_release_dev
;
pci_dev_get
(
dev
);
dev
->
dev
.
dma_mask
=
&
dev
->
dma_mask
;
dev
->
dev
.
coherent_dma_mask
=
0xffffffffull
;
return
dev
;
return
dev
;
}
}
struct
pci_dev
*
__devinit
void
__devinit
pci_device_add
(
struct
pci_dev
*
dev
,
struct
pci_bus
*
bus
)
pci_scan_single_device
(
struct
pci_bus
*
bus
,
int
devfn
)
{
{
struct
pci_dev
*
dev
;
device_initialize
(
&
dev
->
dev
);
dev
->
dev
.
release
=
pci_release_dev
;
dev
=
pci_scan_device
(
bus
,
devfn
);
pci_dev_get
(
dev
);
pci_scan_msi_device
(
dev
);
if
(
!
dev
)
dev
->
dev
.
dma_mask
=
&
dev
->
dma_mask
;
return
NULL
;
dev
->
dev
.
coherent_dma_mask
=
0xffffffffull
;
/* Fix up broken headers */
/* Fix up broken headers */
pci_fixup_device
(
pci_fixup_header
,
dev
);
pci_fixup_device
(
pci_fixup_header
,
dev
);
...
@@ -785,6 +777,19 @@ pci_scan_single_device(struct pci_bus *bus, int devfn)
...
@@ -785,6 +777,19 @@ pci_scan_single_device(struct pci_bus *bus, int devfn)
spin_lock
(
&
pci_bus_lock
);
spin_lock
(
&
pci_bus_lock
);
list_add_tail
(
&
dev
->
bus_list
,
&
bus
->
devices
);
list_add_tail
(
&
dev
->
bus_list
,
&
bus
->
devices
);
spin_unlock
(
&
pci_bus_lock
);
spin_unlock
(
&
pci_bus_lock
);
}
struct
pci_dev
*
__devinit
pci_scan_single_device
(
struct
pci_bus
*
bus
,
int
devfn
)
{
struct
pci_dev
*
dev
;
dev
=
pci_scan_device
(
bus
,
devfn
);
if
(
!
dev
)
return
NULL
;
pci_device_add
(
dev
,
bus
);
pci_scan_msi_device
(
dev
);
return
dev
;
return
dev
;
}
}
...
@@ -881,7 +886,8 @@ unsigned int __devinit pci_do_scan_bus(struct pci_bus *bus)
...
@@ -881,7 +886,8 @@ unsigned int __devinit pci_do_scan_bus(struct pci_bus *bus)
return
max
;
return
max
;
}
}
struct
pci_bus
*
__devinit
pci_scan_bus_parented
(
struct
device
*
parent
,
int
bus
,
struct
pci_ops
*
ops
,
void
*
sysdata
)
struct
pci_bus
*
__devinit
pci_create_bus
(
struct
device
*
parent
,
int
bus
,
struct
pci_ops
*
ops
,
void
*
sysdata
)
{
{
int
error
;
int
error
;
struct
pci_bus
*
b
;
struct
pci_bus
*
b
;
...
@@ -938,8 +944,6 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus,
...
@@ -938,8 +944,6 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus,
b
->
resource
[
0
]
=
&
ioport_resource
;
b
->
resource
[
0
]
=
&
ioport_resource
;
b
->
resource
[
1
]
=
&
iomem_resource
;
b
->
resource
[
1
]
=
&
iomem_resource
;
b
->
subordinate
=
pci_scan_child_bus
(
b
);
return
b
;
return
b
;
sys_create_link_err:
sys_create_link_err:
...
@@ -957,6 +961,18 @@ err_out:
...
@@ -957,6 +961,18 @@ err_out:
kfree
(
b
);
kfree
(
b
);
return
NULL
;
return
NULL
;
}
}
EXPORT_SYMBOL_GPL
(
pci_create_bus
);
struct
pci_bus
*
__devinit
pci_scan_bus_parented
(
struct
device
*
parent
,
int
bus
,
struct
pci_ops
*
ops
,
void
*
sysdata
)
{
struct
pci_bus
*
b
;
b
=
pci_create_bus
(
parent
,
bus
,
ops
,
sysdata
);
if
(
b
)
b
->
subordinate
=
pci_scan_child_bus
(
b
);
return
b
;
}
EXPORT_SYMBOL
(
pci_scan_bus_parented
);
EXPORT_SYMBOL
(
pci_scan_bus_parented
);
#ifdef CONFIG_HOTPLUG
#ifdef CONFIG_HOTPLUG
...
...
drivers/pci/quirks.c
View file @
41d0ab2a
...
@@ -876,6 +876,12 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev)
...
@@ -876,6 +876,12 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev)
case
0xC00C
:
/* Samsung P35 notebook */
case
0xC00C
:
/* Samsung P35 notebook */
asus_hides_smbus
=
1
;
asus_hides_smbus
=
1
;
}
}
}
else
if
(
unlikely
(
dev
->
subsystem_vendor
==
PCI_VENDOR_ID_COMPAQ
))
{
if
(
dev
->
device
==
PCI_DEVICE_ID_INTEL_82855PM_HB
)
switch
(
dev
->
subsystem_device
)
{
case
0x0058
:
/* Compaq Evo N620c */
asus_hides_smbus
=
1
;
}
}
}
}
}
DECLARE_PCI_FIXUP_HEADER
(
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82845_HB
,
asus_hides_smbus_hostbridge
);
DECLARE_PCI_FIXUP_HEADER
(
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82845_HB
,
asus_hides_smbus_hostbridge
);
...
...
include/linux/pci.h
View file @
41d0ab2a
...
@@ -315,8 +315,11 @@ static inline struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *s
...
@@ -315,8 +315,11 @@ static inline struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *s
pci_bus_add_devices
(
root_bus
);
pci_bus_add_devices
(
root_bus
);
return
root_bus
;
return
root_bus
;
}
}
struct
pci_bus
*
pci_create_bus
(
struct
device
*
parent
,
int
bus
,
struct
pci_ops
*
ops
,
void
*
sysdata
);
struct
pci_bus
*
pci_add_new_bus
(
struct
pci_bus
*
parent
,
struct
pci_dev
*
dev
,
int
busnr
);
int
pci_scan_slot
(
struct
pci_bus
*
bus
,
int
devfn
);
int
pci_scan_slot
(
struct
pci_bus
*
bus
,
int
devfn
);
struct
pci_dev
*
pci_scan_single_device
(
struct
pci_bus
*
bus
,
int
devfn
);
struct
pci_dev
*
pci_scan_single_device
(
struct
pci_bus
*
bus
,
int
devfn
);
void
pci_device_add
(
struct
pci_dev
*
dev
,
struct
pci_bus
*
bus
);
unsigned
int
pci_scan_child_bus
(
struct
pci_bus
*
bus
);
unsigned
int
pci_scan_child_bus
(
struct
pci_bus
*
bus
);
void
pci_bus_add_device
(
struct
pci_dev
*
dev
);
void
pci_bus_add_device
(
struct
pci_dev
*
dev
);
void
pci_read_bridge_bases
(
struct
pci_bus
*
child
);
void
pci_read_bridge_bases
(
struct
pci_bus
*
child
);
...
@@ -377,32 +380,32 @@ static inline int pci_write_config_dword(struct pci_dev *dev, int where, u32 val
...
@@ -377,32 +380,32 @@ static inline int pci_write_config_dword(struct pci_dev *dev, int where, u32 val
return
pci_bus_write_config_dword
(
dev
->
bus
,
dev
->
devfn
,
where
,
val
);
return
pci_bus_write_config_dword
(
dev
->
bus
,
dev
->
devfn
,
where
,
val
);
}
}
int
pci_enable_device
(
struct
pci_dev
*
dev
);
int
__must_check
pci_enable_device
(
struct
pci_dev
*
dev
);
int
pci_enable_device_bars
(
struct
pci_dev
*
dev
,
int
mask
);
int
__must_check
pci_enable_device_bars
(
struct
pci_dev
*
dev
,
int
mask
);
void
pci_disable_device
(
struct
pci_dev
*
dev
);
void
pci_disable_device
(
struct
pci_dev
*
dev
);
void
pci_set_master
(
struct
pci_dev
*
dev
);
void
pci_set_master
(
struct
pci_dev
*
dev
);
#define HAVE_PCI_SET_MWI
#define HAVE_PCI_SET_MWI
int
pci_set_mwi
(
struct
pci_dev
*
dev
);
int
__must_check
pci_set_mwi
(
struct
pci_dev
*
dev
);
void
pci_clear_mwi
(
struct
pci_dev
*
dev
);
void
pci_clear_mwi
(
struct
pci_dev
*
dev
);
void
pci_intx
(
struct
pci_dev
*
dev
,
int
enable
);
void
pci_intx
(
struct
pci_dev
*
dev
,
int
enable
);
int
pci_set_dma_mask
(
struct
pci_dev
*
dev
,
u64
mask
);
int
__must_check
pci_set_dma_mask
(
struct
pci_dev
*
dev
,
u64
mask
);
int
pci_set_consistent_dma_mask
(
struct
pci_dev
*
dev
,
u64
mask
);
int
__must_check
pci_set_consistent_dma_mask
(
struct
pci_dev
*
dev
,
u64
mask
);
void
pci_update_resource
(
struct
pci_dev
*
dev
,
struct
resource
*
res
,
int
resno
);
void
pci_update_resource
(
struct
pci_dev
*
dev
,
struct
resource
*
res
,
int
resno
);
int
pci_assign_resource
(
struct
pci_dev
*
dev
,
int
i
);
int
pci_assign_resource
(
struct
pci_dev
*
dev
,
int
i
);
void
pci_restore_bars
(
struct
pci_dev
*
dev
);
void
pci_restore_bars
(
struct
pci_dev
*
dev
);
/* ROM control related routines */
/* ROM control related routines */
void
__iomem
*
pci_map_rom
(
struct
pci_dev
*
pdev
,
size_t
*
size
);
void
__iomem
__must_check
*
pci_map_rom
(
struct
pci_dev
*
pdev
,
size_t
*
size
);
void
__iomem
*
pci_map_rom_copy
(
struct
pci_dev
*
pdev
,
size_t
*
size
);
void
__iomem
__must_check
*
pci_map_rom_copy
(
struct
pci_dev
*
pdev
,
size_t
*
size
);
void
pci_unmap_rom
(
struct
pci_dev
*
pdev
,
void
__iomem
*
rom
);
void
pci_unmap_rom
(
struct
pci_dev
*
pdev
,
void
__iomem
*
rom
);
void
pci_remove_rom
(
struct
pci_dev
*
pdev
);
void
pci_remove_rom
(
struct
pci_dev
*
pdev
);
/* Power management related routines */
/* Power management related routines */
int
pci_save_state
(
struct
pci_dev
*
dev
);
int
pci_save_state
(
struct
pci_dev
*
dev
);
int
pci_restore_state
(
struct
pci_dev
*
dev
);
int
pci_restore_state
(
struct
pci_dev
*
dev
);
int
pci_set_power_state
(
struct
pci_dev
*
dev
,
pci_power_t
state
);
int
__must_check
pci_set_power_state
(
struct
pci_dev
*
dev
,
pci_power_t
state
);
pci_power_t
pci_choose_state
(
struct
pci_dev
*
dev
,
pm_message_t
state
);
pci_power_t
__must_check
pci_choose_state
(
struct
pci_dev
*
dev
,
pm_message_t
state
);
int
pci_enable_wake
(
struct
pci_dev
*
dev
,
pci_power_t
state
,
int
enable
);
int
__must_check
pci_enable_wake
(
struct
pci_dev
*
dev
,
pci_power_t
state
,
int
enable
);
/* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */
/* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */
void
pci_bus_assign_resources
(
struct
pci_bus
*
bus
);
void
pci_bus_assign_resources
(
struct
pci_bus
*
bus
);
...
...
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