Re: [PATCH 1/2] PCI: Add pci_bus_specific_read_dev_vendor_id() to workaround PCI switch specific issues prior to accessing newly added endpoint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/26/2018 3:32 PM, James Puthukattukaran wrote:
>> All errors (new ones prefixed by >>):
>>
>>    drivers/pci/probe.o: In function `pci_bus_read_dev_vendor_id':
>>>> probe.c:(.text+0x3e02): undefined reference to `pci_bus_specific_read_dev_vendor_id'
> Alex/Sinan -
> 
> Would it be an acceptable fix for this problem?
> 
> 
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -2097,6 +2097,13 @@ static bool pci_bus_wait_crs(struct pci_bus *bus, int devfn, u32 *l,
>  	return true;
>  }
>  
> +int __weak pci_bus_specific_read_dev_vendor_id(struct pci_bus *bus, int devfn, 
> +					u32 *l, int timeout)
> +{
> +	return -ENOTTY;
> +}
> +
> +

I don't think so. pci_bus_specific_read_dev_vendor_id() is defined in quirks.c if
CONFIG_PCI_QUIRKS is defined only. 

You need to add something similar to drivers/pci.h file

#ifdef CONFIG_PCI_QUIRKS
int pci_dev_specific_reset(struct pci_dev *dev, int probe);
#else
static inline int pci_dev_specific_reset(struct pci_dev *dev, int probe)
{
	return -ENOTTY;
}
#endif 


while you are there please convert

> +
> +

to 

> +

in your patch and bump the version number on your next post using 

--subject-prefix="PATCH V2"

to your git send-email command.

-- 
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.



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux