* [PATCH 04/30] ata: deprecate pci_get_bus_and_slot() [not found] <1511328675-21981-1-git-send-email-okaya@codeaurora.org> @ 2017-11-22 5:30 ` Sinan Kaya 2017-11-22 5:30 ` [PATCH 12/30] Drivers: ide: " Sinan Kaya 1 sibling, 0 replies; 4+ messages in thread From: Sinan Kaya @ 2017-11-22 5:30 UTC (permalink / raw) To: linux-pci, timur Cc: Bartlomiej Zolnierkiewicz, linux-arm-msm, open list, Sinan Kaya, 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. Use pci_get_domain_bus_and_slot() with a domain number of 0 where we can't extract the domain number. Other places, use the actual domain number from the device. Signed-off-by: Sinan Kaya <okaya@codeaurora.org> --- drivers/ata/pata_ali.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index d19cd88..b297fea 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c @@ -466,7 +466,7 @@ 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(0, 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 12/30] Drivers: ide: deprecate pci_get_bus_and_slot() [not found] <1511328675-21981-1-git-send-email-okaya@codeaurora.org> 2017-11-22 5:30 ` [PATCH 04/30] ata: deprecate pci_get_bus_and_slot() Sinan Kaya @ 2017-11-22 5:30 ` Sinan Kaya 2017-11-22 7:53 ` Greg KH 1 sibling, 1 reply; 4+ messages in thread From: Sinan Kaya @ 2017-11-22 5:30 UTC (permalink / raw) To: linux-pci, timur Cc: linux-arm-msm, linux-arm-kernel, Sinan Kaya, David S. Miller, open list:IDE SUBSYSTEM, open list 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. Use pci_get_domain_bus_and_slot() with a domain number of 0 where we can't extract the domain number. Other places, use the actual domain number from the device. 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 12/30] Drivers: ide: deprecate pci_get_bus_and_slot() 2017-11-22 5:30 ` [PATCH 12/30] Drivers: ide: " Sinan Kaya @ 2017-11-22 7:53 ` Greg KH 2017-11-22 16:24 ` Sinan Kaya 0 siblings, 1 reply; 4+ messages in thread From: Greg KH @ 2017-11-22 7:53 UTC (permalink / raw) To: Sinan Kaya Cc: linux-pci, timur, linux-arm-msm, linux-arm-kernel, David S. Miller, open list:IDE SUBSYSTEM, open list On Wed, Nov 22, 2017 at 12:30:57AM -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. > > Use pci_get_domain_bus_and_slot() with a domain number of 0 where we can't > extract the domain number. Other places, use the actual domain number from > the device. While this is a great generic text, you might want to make it a bit more custom to each specific patch. For example, you don't use a domain of 0 in this one, so the text is a bit wrong and confusing if you look at it stand-alone. I like the series and the idea, just fix up this text in some of the patches and you should be fine. thanks, greg k-h ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 12/30] Drivers: ide: deprecate pci_get_bus_and_slot() 2017-11-22 7:53 ` Greg KH @ 2017-11-22 16:24 ` Sinan Kaya 0 siblings, 0 replies; 4+ messages in thread From: Sinan Kaya @ 2017-11-22 16:24 UTC (permalink / raw) To: Greg KH Cc: linux-pci, timur, linux-arm-msm, linux-arm-kernel, David S. Miller, open list:IDE SUBSYSTEM, open list On 11/22/2017 2:53 AM, Greg KH wrote: > On Wed, Nov 22, 2017 at 12:30:57AM -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. >> >> Use pci_get_domain_bus_and_slot() with a domain number of 0 where we can't >> extract the domain number. Other places, use the actual domain number from >> the device. > > While this is a great generic text, you might want to make it a bit more > custom to each specific patch. For example, you don't use a domain of 0 > in this one, so the text is a bit wrong and confusing if you look at it > stand-alone. > > I like the series and the idea, just fix up this text in some of the > patches and you should be fine. OK. Will do on the next version. -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-22 16:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1511328675-21981-1-git-send-email-okaya@codeaurora.org>
2017-11-22 5:30 ` [PATCH 04/30] ata: deprecate pci_get_bus_and_slot() Sinan Kaya
2017-11-22 5:30 ` [PATCH 12/30] Drivers: ide: " Sinan Kaya
2017-11-22 7:53 ` Greg KH
2017-11-22 16:24 ` Sinan Kaya
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox