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
2f30a379
Commit
2f30a379
authored
Nov 18, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/gregkh/linux/pci-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
0137957a
31aa0ea5
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
158 deletions
+8
-158
Documentation/pci.txt
Documentation/pci.txt
+3
-5
drivers/pci/hotplug/Makefile
drivers/pci/hotplug/Makefile
+0
-1
drivers/pci/hotplug/cpcihp_generic.c
drivers/pci/hotplug/cpcihp_generic.c
+1
-1
drivers/pci/hotplug/pciehp.h
drivers/pci/hotplug/pciehp.h
+0
-3
drivers/pci/hotplug/pciehp_sysfs.c
drivers/pci/hotplug/pciehp_sysfs.c
+0
-143
drivers/pci/hotplug/rpaphp_pci.c
drivers/pci/hotplug/rpaphp_pci.c
+4
-5
No files found.
Documentation/pci.txt
View file @
2f30a379
...
...
@@ -156,11 +156,9 @@ Searching by both vendor/device and subsystem vendor/device ID:
VENDOR_ID or DEVICE_ID. This allows searching for any device from a
specific vendor, for example.
Note that these functions are not hotplug-safe. Their hotplug-safe
replacements are pci_get_device(), pci_get_class() and pci_get_subsys().
They increment the reference count on the pci_dev that they return.
You must eventually (possibly at module unload) decrement the reference
count on these devices by calling pci_dev_put().
These functions are hotplug-safe. They increment the reference count on
the pci_dev that they return. You must eventually (possibly at module unload)
decrement the reference count on these devices by calling pci_dev_put().
3. Enabling and disabling devices
...
...
drivers/pci/hotplug/Makefile
View file @
2f30a379
...
...
@@ -51,7 +51,6 @@ rpadlpar_io-objs := rpadlpar_core.o \
pciehp-objs
:=
pciehp_core.o
\
pciehp_ctrl.o
\
pciehp_pci.o
\
pciehp_sysfs.o
\
pciehp_hpc.o
ifdef
CONFIG_ACPI_BUS
pciehp-objs
+=
pciehprm_acpi.o
...
...
drivers/pci/hotplug/cpcihp_generic.c
View file @
2f30a379
...
...
@@ -63,7 +63,7 @@
/* local variables */
static
int
debug
;
static
char
bridge
[
256
]
;
static
char
*
bridge
;
static
u8
bridge_busnr
;
static
u8
bridge_slot
;
static
struct
pci_bus
*
bus
;
...
...
drivers/pci/hotplug/pciehp.h
View file @
2f30a379
...
...
@@ -207,9 +207,6 @@ struct resource_lists {
#define msg_button_cancel "PCI slot #%d - action canceled due to button press.\n"
#define msg_button_ignore "PCI slot #%d - button press ignored. (action in progress...)\n"
/* sysfs function for the hotplug controller info */
extern
void
pciehp_create_ctrl_files
(
struct
controller
*
ctrl
);
/* controller functions */
extern
int
pciehprm_find_available_resources
(
struct
controller
*
ctrl
);
extern
int
pciehp_event_start_thread
(
void
);
...
...
drivers/pci/hotplug/pciehp_sysfs.c
deleted
100644 → 0
View file @
0137957a
/*
* PCI Express Hot Plug Controller Driver
*
* Copyright (C) 1995,2001 Compaq Computer Corporation
* Copyright (C) 2001,2003 Greg Kroah-Hartman (greg@kroah.com)
* Copyright (C) 2001 IBM Corp.
*
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
* NON INFRINGEMENT. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Send feedback to <greg@kroah.com>
*
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/proc_fs.h>
#include <linux/workqueue.h>
#include <linux/pci.h>
#include "pciehp.h"
/* A few routines that create sysfs entries for the hot plug controller */
static
ssize_t
show_ctrl
(
struct
device
*
dev
,
char
*
buf
)
{
struct
pci_dev
*
pci_dev
;
struct
controller
*
ctrl
;
char
*
out
=
buf
;
int
index
;
struct
pci_resource
*
res
;
pci_dev
=
container_of
(
dev
,
struct
pci_dev
,
dev
);
ctrl
=
pci_get_drvdata
(
pci_dev
);
out
+=
sprintf
(
buf
,
"Free resources: memory
\n
"
);
index
=
11
;
res
=
ctrl
->
mem_head
;
while
(
res
&&
index
--
)
{
out
+=
sprintf
(
out
,
"start = %8.8x, length = %8.8x
\n
"
,
res
->
base
,
res
->
length
);
res
=
res
->
next
;
}
out
+=
sprintf
(
out
,
"Free resources: prefetchable memory
\n
"
);
index
=
11
;
res
=
ctrl
->
p_mem_head
;
while
(
res
&&
index
--
)
{
out
+=
sprintf
(
out
,
"start = %8.8x, length = %8.8x
\n
"
,
res
->
base
,
res
->
length
);
res
=
res
->
next
;
}
out
+=
sprintf
(
out
,
"Free resources: IO
\n
"
);
index
=
11
;
res
=
ctrl
->
io_head
;
while
(
res
&&
index
--
)
{
out
+=
sprintf
(
out
,
"start = %8.8x, length = %8.8x
\n
"
,
res
->
base
,
res
->
length
);
res
=
res
->
next
;
}
out
+=
sprintf
(
out
,
"Free resources: bus numbers
\n
"
);
index
=
11
;
res
=
ctrl
->
bus_head
;
while
(
res
&&
index
--
)
{
out
+=
sprintf
(
out
,
"start = %8.8x, length = %8.8x
\n
"
,
res
->
base
,
res
->
length
);
res
=
res
->
next
;
}
return
out
-
buf
;
}
static
DEVICE_ATTR
(
ctrl
,
S_IRUGO
,
show_ctrl
,
NULL
);
static
ssize_t
show_dev
(
struct
device
*
dev
,
char
*
buf
)
{
struct
pci_dev
*
pci_dev
;
struct
controller
*
ctrl
;
char
*
out
=
buf
;
int
index
;
struct
pci_resource
*
res
;
struct
pci_func
*
new_slot
;
struct
slot
*
slot
;
pci_dev
=
container_of
(
dev
,
struct
pci_dev
,
dev
);
ctrl
=
pci_get_drvdata
(
pci_dev
);
slot
=
ctrl
->
slot
;
while
(
slot
)
{
new_slot
=
pciehp_slot_find
(
slot
->
bus
,
slot
->
device
,
0
);
if
(
!
new_slot
)
break
;
out
+=
sprintf
(
out
,
"assigned resources: memory
\n
"
);
index
=
11
;
res
=
new_slot
->
mem_head
;
while
(
res
&&
index
--
)
{
out
+=
sprintf
(
out
,
"start = %8.8x, length = %8.8x
\n
"
,
res
->
base
,
res
->
length
);
res
=
res
->
next
;
}
out
+=
sprintf
(
out
,
"assigned resources: prefetchable memory
\n
"
);
index
=
11
;
res
=
new_slot
->
p_mem_head
;
while
(
res
&&
index
--
)
{
out
+=
sprintf
(
out
,
"start = %8.8x, length = %8.8x
\n
"
,
res
->
base
,
res
->
length
);
res
=
res
->
next
;
}
out
+=
sprintf
(
out
,
"assigned resources: IO
\n
"
);
index
=
11
;
res
=
new_slot
->
io_head
;
while
(
res
&&
index
--
)
{
out
+=
sprintf
(
out
,
"start = %8.8x, length = %8.8x
\n
"
,
res
->
base
,
res
->
length
);
res
=
res
->
next
;
}
out
+=
sprintf
(
out
,
"assigned resources: bus numbers
\n
"
);
index
=
11
;
res
=
new_slot
->
bus_head
;
while
(
res
&&
index
--
)
{
out
+=
sprintf
(
out
,
"start = %8.8x, length = %8.8x
\n
"
,
res
->
base
,
res
->
length
);
res
=
res
->
next
;
}
slot
=
slot
->
next
;
}
return
out
-
buf
;
}
static
DEVICE_ATTR
(
dev
,
S_IRUGO
,
show_dev
,
NULL
);
void
pciehp_create_ctrl_files
(
struct
controller
*
ctrl
)
{
device_create_file
(
&
ctrl
->
pci_dev
->
dev
,
&
dev_attr_ctrl
);
device_create_file
(
&
ctrl
->
pci_dev
->
dev
,
&
dev_attr_dev
);
}
drivers/pci/hotplug/rpaphp_pci.c
View file @
2f30a379
...
...
@@ -31,18 +31,17 @@
struct
pci_dev
*
rpaphp_find_pci_dev
(
struct
device_node
*
dn
)
{
struct
pci_dev
*
retval_dev
=
NULL
,
*
dev
=
NULL
;
struct
pci_dev
*
dev
=
NULL
;
char
bus_id
[
BUS_ID_SIZE
];
sprintf
(
bus_id
,
"%04x:%02x:%02x.%d"
,
dn
->
phb
->
global_number
,
sprintf
(
bus_id
,
"%04x:%02x:%02x.%d"
,
dn
->
phb
->
global_number
,
dn
->
busno
,
PCI_SLOT
(
dn
->
devfn
),
PCI_FUNC
(
dn
->
devfn
));
while
((
dev
=
pci_find_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
dev
))
!=
NULL
)
{
for_each_pci_dev
(
dev
)
{
if
(
!
strcmp
(
pci_name
(
dev
),
bus_id
))
{
retval_dev
=
dev
;
break
;
}
}
return
retval_
dev
;
return
dev
;
}
EXPORT_SYMBOL_GPL
(
rpaphp_find_pci_dev
);
...
...
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