On Thu, May 18, 2023 at 12:14:46PM +0000, Rahul Singh wrote: > Hi Roger, > > > On 18 May 2023, at 11:57 am, Roger Pau Monne <roger....@citrix.com> wrote: > > > > When a domain parameter is provided to pci_get_pdev() the search > > function would match against the bdf, without taking the segment into > > account. > > > > Fix this and also account for the passed segment. > > > > Fixes: 8cf6e0738906 ('PCI: simplify (and thus correct) > > pci_get_pdev{,_by_domain}()') > > Signed-off-by: Roger Pau Monné <roger....@citrix.com> > > I think the correct fixes tag is: > Fixes: a37f9ea7a651 ("PCI: fold pci_get_pdev{,_by_domain}()")
I don't think so, a37f9ea7a651 just changed: list_for_each_entry ( pdev, &d->pdev_list, domain_list ) - if ( pdev->bus == bus && pdev->devfn == devfn ) + if ( pdev->sbdf.bdf == sbdf.bdf ) return pdev; That code was already wrong, a37f9ea7a651 simply switched it to use the sbdf struct field. Thanks, Roger.