* [PATCH V3 04/29] ata: deprecate pci_get_bus_and_slot()
[not found] <1511801886-6753-1-git-send-email-okaya@codeaurora.org>
@ 2017-11-27 16:57 ` Sinan Kaya
2017-11-27 19:50 ` Tejun Heo
2017-11-27 16:57 ` [PATCH V3 11/29] Drivers: ide: " Sinan Kaya
1 sibling, 1 reply; 3+ messages in thread
From: Sinan Kaya @ 2017-11-27 16:57 UTC (permalink / raw)
To: linux-pci, timur
Cc: Bartlomiej Zolnierkiewicz, linux-arm-msm, intel-gfx, open list,
open list:LIBATA PATA DRIVERS, Tejun Heo, linux-arm-kernel
pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as
where a PCI device is present. This restricts the device drivers to be
reused for other domain numbers.
Getting ready to remove pci_get_bus_and_slot() function in favor of
pci_get_domain_bus_and_slot().
Use pci_get_domain_bus_and_slot() and extract the actual domain number
from the pdev passed in.
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
drivers/ata/pata_ali.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
index d19cd88..0b122f9 100644
--- a/drivers/ata/pata_ali.c
+++ b/drivers/ata/pata_ali.c
@@ -466,7 +466,8 @@ static void ali_init_chipset(struct pci_dev *pdev)
tmp |= 0x01; /* CD_ROM enable for DMA */
pci_write_config_byte(pdev, 0x53, tmp);
}
- north = pci_get_bus_and_slot(0, PCI_DEVFN(0,0));
+ north = pci_get_domain_bus_and_slot(pci_domain_nr(pdev->bus), 0,
+ PCI_DEVFN(0, 0));
if (north && north->vendor == PCI_VENDOR_ID_AL && ali_isa_bridge) {
/* Configure the ALi bridge logic. For non ALi rely on BIOS.
Set the south bridge enable bit */
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH V3 11/29] Drivers: ide: deprecate pci_get_bus_and_slot()
[not found] <1511801886-6753-1-git-send-email-okaya@codeaurora.org>
2017-11-27 16:57 ` [PATCH V3 04/29] ata: deprecate pci_get_bus_and_slot() Sinan Kaya
@ 2017-11-27 16:57 ` Sinan Kaya
1 sibling, 0 replies; 3+ messages in thread
From: Sinan Kaya @ 2017-11-27 16:57 UTC (permalink / raw)
To: linux-pci, timur
Cc: linux-arm-msm, intel-gfx, open list, open list:IDE SUBSYSTEM,
David S. Miller, linux-arm-kernel
pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as
where a PCI device is present. This restricts the device drivers to be
reused for other domain numbers.
Getting ready to remove pci_get_bus_and_slot() function in favor of
pci_get_domain_bus_and_slot().
Replace pci_get_bus_and_slot() with pci_get_domain_bus_and_slot()
and extract the domain number from struct pci_dev.
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
drivers/ide/sl82c105.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/ide/sl82c105.c b/drivers/ide/sl82c105.c
index 8755df3..3300dac 100644
--- a/drivers/ide/sl82c105.c
+++ b/drivers/ide/sl82c105.c
@@ -239,8 +239,9 @@ static u8 sl82c105_bridge_revision(struct pci_dev *dev)
/*
* The bridge should be part of the same device, but function 0.
*/
- bridge = pci_get_bus_and_slot(dev->bus->number,
- PCI_DEVFN(PCI_SLOT(dev->devfn), 0));
+ bridge = pci_get_domain_bus_and_slot(pci_domain_nr(dev->bus),
+ dev->bus->number,
+ PCI_DEVFN(PCI_SLOT(dev->devfn), 0));
if (!bridge)
return -1;
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH V3 04/29] ata: deprecate pci_get_bus_and_slot()
2017-11-27 16:57 ` [PATCH V3 04/29] ata: deprecate pci_get_bus_and_slot() Sinan Kaya
@ 2017-11-27 19:50 ` Tejun Heo
0 siblings, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2017-11-27 19:50 UTC (permalink / raw)
To: Sinan Kaya
Cc: Bartlomiej Zolnierkiewicz, linux-pci, timur, open list,
open list:LIBATA PATA DRIVERS, linux-arm-msm, intel-gfx,
linux-arm-kernel
On Mon, Nov 27, 2017 at 11:57:41AM -0500, Sinan Kaya wrote:
> pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as
> where a PCI device is present. This restricts the device drivers to be
> reused for other domain numbers.
>
> Getting ready to remove pci_get_bus_and_slot() function in favor of
> pci_get_domain_bus_and_slot().
>
> Use pci_get_domain_bus_and_slot() and extract the actual domain number
> from the pdev passed in.
>
> Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Acked-by: Tejun Heo <tj@kernel.org>
Please feel free to route with the rest of the series.
Thanks.
--
tejun
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-27 19:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1511801886-6753-1-git-send-email-okaya@codeaurora.org>
2017-11-27 16:57 ` [PATCH V3 04/29] ata: deprecate pci_get_bus_and_slot() Sinan Kaya
2017-11-27 19:50 ` Tejun Heo
2017-11-27 16:57 ` [PATCH V3 11/29] Drivers: ide: " Sinan Kaya
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox