* [GIT PATCH] PCI fixes for 2.6.21-rc3
@ 2007-03-10 4:03 Greg KH
2007-03-10 4:08 ` [PATCH 1/4] PCI: allow multiple calls to pcim_pin_device() Greg Kroah-Hartman
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2007-03-10 4:03 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, linux-pci, pcihpd-discuss
Here are some PCI fixes against 2.6.21-rc3
They fix a problem that shows up with the libata drivers and fix a number of
section mismatches.
All of these have been in the -mm tree.
Please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6.git/
The full patches will be sent to the linux-pci mailing list, if anyone
wants to see it
thanks,
greg k-h
drivers/pci/pci.c | 15 ++++++++-------
drivers/pci/pcie/aer/aerdrv.c | 6 +++---
drivers/pci/pcie/portdrv_pci.c | 6 +++---
drivers/pci/search.c | 2 +-
4 files changed, 15 insertions(+), 14 deletions(-)
---------------
Sam Ravnborg (3):
pcie: fix section mismatch warning
PCI: aer: fix section mismatch warning
pci: fix section mismatch warning
Tejun Heo (1):
PCI: allow multiple calls to pcim_pin_device()
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] PCI: allow multiple calls to pcim_pin_device()
2007-03-10 4:03 [GIT PATCH] PCI fixes for 2.6.21-rc3 Greg KH
@ 2007-03-10 4:08 ` Greg Kroah-Hartman
2007-03-10 4:08 ` [PATCH 2/4] pcie: fix section mismatch warning Greg Kroah-Hartman
0 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2007-03-10 4:08 UTC (permalink / raw)
To: linux-pci
Cc: linux-kernel, pcihpd-discuss, Tejun Heo, Andrew Morton,
Greg Kroah-Hartman
From: Tejun Heo <htejun@gmail.com>
Sanity check in pcim_pin_device() was too restrictive in that it didn't
allow multiple calls to the function, which is against the devres
philosohpy of fire-and-forget. Track pinned status separately and allow
pinning multiple times.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/pci.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index df49530..a32db06 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -757,7 +757,8 @@ int pci_enable_device(struct pci_dev *dev)
* when a device is enabled using managed PCI device enable interface.
*/
struct pci_devres {
- unsigned int disable:1;
+ unsigned int enabled:1;
+ unsigned int pinned:1;
unsigned int orig_intx:1;
unsigned int restore_intx:1;
u32 region_mask;
@@ -781,7 +782,7 @@ static void pcim_release(struct device *gendev, void *res)
if (this->restore_intx)
pci_intx(dev, this->orig_intx);
- if (this->disable)
+ if (this->enabled && !this->pinned)
pci_disable_device(dev);
}
@@ -820,12 +821,12 @@ int pcim_enable_device(struct pci_dev *pdev)
dr = get_pci_dr(pdev);
if (unlikely(!dr))
return -ENOMEM;
- WARN_ON(!!dr->disable);
+ WARN_ON(!!dr->enabled);
rc = pci_enable_device(pdev);
if (!rc) {
pdev->is_managed = 1;
- dr->disable = 1;
+ dr->enabled = 1;
}
return rc;
}
@@ -843,9 +844,9 @@ void pcim_pin_device(struct pci_dev *pdev)
struct pci_devres *dr;
dr = find_pci_dr(pdev);
- WARN_ON(!dr || !dr->disable);
+ WARN_ON(!dr || !dr->enabled);
if (dr)
- dr->disable = 0;
+ dr->pinned = 1;
}
/**
@@ -876,7 +877,7 @@ pci_disable_device(struct pci_dev *dev)
dr = find_pci_dr(dev);
if (dr)
- dr->disable = 0;
+ dr->enabled = 0;
if (atomic_sub_return(1, &dev->enable_cnt) != 0)
return;
--
1.5.0.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] pcie: fix section mismatch warning
2007-03-10 4:08 ` [PATCH 1/4] PCI: allow multiple calls to pcim_pin_device() Greg Kroah-Hartman
@ 2007-03-10 4:08 ` Greg Kroah-Hartman
2007-03-10 4:08 ` [PATCH 3/4] PCI: aer: " Greg Kroah-Hartman
0 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2007-03-10 4:08 UTC (permalink / raw)
To: linux-pci; +Cc: linux-kernel, pcihpd-discuss, Sam Ravnborg, Greg Kroah-Hartman
From: Sam Ravnborg <sam@ravnborg.org>
Fix following section mismatch warning (when compiled with CONFIG_HOTPLUG=n):
WARNING: drivers/pci/built-in.o - Section mismatch: reference to .init.text:pcie_portdrv_probe from .data between 'pcie_portdrv' (at offset 0xe40) and 'pcie_portdrv_err_handler'
This warning was fixed by renaming pcie_portdrv to pcie_portdriver so we pass
the whitelist.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/pcie/portdrv_pci.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index f17e7ed..0be5a0b 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -276,7 +276,7 @@ static struct pci_error_handlers pcie_portdrv_err_handler = {
.resume = pcie_portdrv_err_resume,
};
-static struct pci_driver pcie_portdrv = {
+static struct pci_driver pcie_portdriver = {
.name = (char *)device_name,
.id_table = &port_pci_ids[0],
@@ -298,7 +298,7 @@ static int __init pcie_portdrv_init(void)
printk(KERN_WARNING "PCIE: bus_register error: %d\n", retval);
goto out;
}
- retval = pci_register_driver(&pcie_portdrv);
+ retval = pci_register_driver(&pcie_portdriver);
if (retval)
pcie_port_bus_unregister();
out:
@@ -307,7 +307,7 @@ static int __init pcie_portdrv_init(void)
static void __exit pcie_portdrv_exit(void)
{
- pci_unregister_driver(&pcie_portdrv);
+ pci_unregister_driver(&pcie_portdriver);
pcie_port_bus_unregister();
}
--
1.5.0.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] PCI: aer: fix section mismatch warning
2007-03-10 4:08 ` [PATCH 2/4] pcie: fix section mismatch warning Greg Kroah-Hartman
@ 2007-03-10 4:08 ` Greg Kroah-Hartman
2007-03-10 4:08 ` [PATCH 4/4] pci: " Greg Kroah-Hartman
0 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2007-03-10 4:08 UTC (permalink / raw)
To: linux-pci; +Cc: linux-kernel, pcihpd-discuss, Sam Ravnborg, Greg Kroah-Hartman
From: Sam Ravnborg <sam@ravnborg.org>
Fix following section mismatch warning (when compiled with CONFIG_HOTPLUG=n):
WARNING: drivers/pci/built-in.o - Section mismatch: reference to .init.text:aer_probe from .data between 'aerdrv' (at offset 0x1608) and 'aer_error_handlers'
Warning was fixed by renaming aerdrv to aerdriver so we pass the whitelist.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/pcie/aer/aerdrv.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c
index b164de0..db6ad8e 100644
--- a/drivers/pci/pcie/aer/aerdrv.c
+++ b/drivers/pci/pcie/aer/aerdrv.c
@@ -66,7 +66,7 @@ static struct pci_error_handlers aer_error_handlers = {
.resume = aer_error_resume,
};
-static struct pcie_port_service_driver aerdrv = {
+static struct pcie_port_service_driver aerdriver = {
.name = "aer",
.id_table = &aer_id[0],
@@ -328,7 +328,7 @@ static void aer_error_resume(struct pci_dev *dev)
**/
static int __init aer_service_init(void)
{
- return pcie_port_service_register(&aerdrv);
+ return pcie_port_service_register(&aerdriver);
}
/**
@@ -338,7 +338,7 @@ static int __init aer_service_init(void)
**/
static void __exit aer_service_exit(void)
{
- pcie_port_service_unregister(&aerdrv);
+ pcie_port_service_unregister(&aerdriver);
}
module_init(aer_service_init);
--
1.5.0.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] pci: fix section mismatch warning
2007-03-10 4:08 ` [PATCH 3/4] PCI: aer: " Greg Kroah-Hartman
@ 2007-03-10 4:08 ` Greg Kroah-Hartman
0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2007-03-10 4:08 UTC (permalink / raw)
To: linux-pci; +Cc: linux-kernel, pcihpd-discuss, Sam Ravnborg, Greg Kroah-Hartman
From: Sam Ravnborg <sam@ravnborg.org>
drivers/pci/search.c caused following section mismatch warning
(if compiled with CONFIG_HOTPLUG=n):
WARNING: drivers/pci/built-in.o - Section mismatch: reference to .init.text: from .text.pci_find_bus after 'pci_find_bus' (at offset 0x24)
This was due to pci_find_bus() calling a function marked __devinit.
Fix was to remove the __devinit from the offending function.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/search.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/pci/search.c b/drivers/pci/search.c
index ff98ead..2dd8681 100644
--- a/drivers/pci/search.c
+++ b/drivers/pci/search.c
@@ -15,7 +15,7 @@
DECLARE_RWSEM(pci_bus_sem);
-static struct pci_bus * __devinit
+static struct pci_bus *
pci_do_find_bus(struct pci_bus* bus, unsigned char busnr)
{
struct pci_bus* child;
--
1.5.0.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-03-10 4:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-10 4:03 [GIT PATCH] PCI fixes for 2.6.21-rc3 Greg KH
2007-03-10 4:08 ` [PATCH 1/4] PCI: allow multiple calls to pcim_pin_device() Greg Kroah-Hartman
2007-03-10 4:08 ` [PATCH 2/4] pcie: fix section mismatch warning Greg Kroah-Hartman
2007-03-10 4:08 ` [PATCH 3/4] PCI: aer: " Greg Kroah-Hartman
2007-03-10 4:08 ` [PATCH 4/4] pci: " Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox