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
6e058568
Commit
6e058568
authored
May 27, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Plain Diff
Merge kroah.com:/home/greg/linux/BK/bleed-2.6
into kroah.com:/home/greg/linux/BK/pci-2.6
parents
e743bea2
db09cd90
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
2 deletions
+41
-2
drivers/pci/pci-driver.c
drivers/pci/pci-driver.c
+24
-2
drivers/pci/pci.c
drivers/pci/pci.c
+5
-0
include/linux/pci.h
include/linux/pci.h
+5
-0
include/linux/pci_ids.h
include/linux/pci_ids.h
+7
-0
No files found.
drivers/pci/pci-driver.c
View file @
6e058568
...
...
@@ -299,10 +299,30 @@ static int pci_device_suspend(struct device * dev, u32 state)
{
struct
pci_dev
*
pci_dev
=
to_pci_dev
(
dev
);
struct
pci_driver
*
drv
=
pci_dev
->
driver
;
int
i
=
0
;
if
(
drv
&&
drv
->
suspend
)
return
drv
->
suspend
(
pci_dev
,
state
);
return
0
;
i
=
drv
->
suspend
(
pci_dev
,
state
);
pci_save_state
(
pci_dev
,
pci_dev
->
saved_config_space
);
return
i
;
}
/*
* Default resume method for devices that have no driver provided resume,
* or not even a driver at all.
*/
static
void
pci_default_resume
(
struct
pci_dev
*
pci_dev
)
{
/* restore the PCI config space */
pci_restore_state
(
pci_dev
,
pci_dev
->
saved_config_space
);
/* if the device was enabled before suspend, reenable */
if
(
pci_dev
->
is_enabled
)
pci_enable_device
(
pci_dev
);
/* if the device was busmaster before the suspend, make it busmaster again */
if
(
pci_dev
->
is_busmaster
)
pci_set_master
(
pci_dev
);
}
static
int
pci_device_resume
(
struct
device
*
dev
)
...
...
@@ -312,6 +332,8 @@ static int pci_device_resume(struct device * dev)
if
(
drv
&&
drv
->
resume
)
drv
->
resume
(
pci_dev
);
else
pci_default_resume
(
pci_dev
);
return
0
;
}
...
...
drivers/pci/pci.c
View file @
6e058568
...
...
@@ -385,6 +385,7 @@ pci_enable_device_bars(struct pci_dev *dev, int bars)
int
pci_enable_device
(
struct
pci_dev
*
dev
)
{
dev
->
is_enabled
=
1
;
return
pci_enable_device_bars
(
dev
,
(
1
<<
PCI_NUM_RESOURCES
)
-
1
);
}
...
...
@@ -399,6 +400,9 @@ void
pci_disable_device
(
struct
pci_dev
*
dev
)
{
u16
pci_command
;
dev
->
is_enabled
=
0
;
dev
->
is_busmaster
=
0
;
pci_read_config_word
(
dev
,
PCI_COMMAND
,
&
pci_command
);
if
(
pci_command
&
PCI_COMMAND_MASTER
)
{
...
...
@@ -601,6 +605,7 @@ pci_set_master(struct pci_dev *dev)
cmd
|=
PCI_COMMAND_MASTER
;
pci_write_config_word
(
dev
,
PCI_COMMAND
,
cmd
);
}
dev
->
is_busmaster
=
1
;
pcibios_set_master
(
dev
);
}
...
...
include/linux/pci.h
View file @
6e058568
...
...
@@ -488,6 +488,11 @@ struct pci_dev {
/* These fields are used by common fixups */
unsigned
int
transparent
:
1
;
/* Transparent PCI bridge */
unsigned
int
multifunction
:
1
;
/* Part of multi-function device */
/* keep track of device state */
unsigned
int
is_enabled
:
1
;
/* pci_enable_device has been called */
unsigned
int
is_busmaster
:
1
;
/* device is busmaster */
unsigned
int
saved_config_space
[
16
];
/* config space saved at suspend time */
#ifdef CONFIG_PCI_NAMES
#define PCI_NAME_SIZE 96
#define PCI_NAME_HALF __stringify(43)
/* less than half to handle slop */
...
...
include/linux/pci_ids.h
View file @
6e058568
...
...
@@ -1875,6 +1875,11 @@
#define PCI_VENDOR_ID_ZOLTRIX 0x15b0
#define PCI_DEVICE_ID_ZOLTRIX_2BD0 0x2bd0
#define PCI_VENDOR_ID_MELLANOX 0x15b3
#define PCI_DEVICE_ID_MELLANOX_TAVOR 0x5a44
#define PCI_DEVICE_ID_MELLANOX_ARBEL_COMPAT 0x6278
#define PCI_DEVICE_ID_MELLANOX_ARBEL 0x6282
#define PCI_VENDOR_ID_PDC 0x15e9
#define PCI_DEVICE_ID_PDC_1841 0x1841
...
...
@@ -1905,6 +1910,8 @@
#define PCI_DEVICE_ID_S2IO_WIN 0x5731
#define PCI_DEVICE_ID_S2IO_UNI 0x5831
#define PCI_VENDOR_ID_TOPSPIN 0x1867
#define PCI_VENDOR_ID_ARC 0x192E
#define PCI_DEVICE_ID_ARC_EHCI 0x0101
...
...
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