Re: [RFC] use pci_find_ext_capability everywhere

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

 



On Thu, Oct 02, 2008 at 11:50:24AM -0700, Jesse Barnes wrote:
> +++ b/drivers/pci/pcie/aer/aerdrv.c
> @@ -105,7 +105,7 @@ static irqreturn_t aer_irq(int irq, void *context)
>  	unsigned long flags;
>  	int pos;
>  
> -	pos = pci_find_aer_capability(pdev->port);
> +	pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR);
>  	/*
>  	 * Must lock access to Root Error Status Reg, Root Error ID Reg,
>  	 * and Root error producer/consumer index

Waitaminute ... you didn't actually compile this, did you?  pdev changes
to dev in three other hunks:

> +++ b/drivers/pci/pcie/aer/aerdrv_core.c
> @@ -541,7 +512,7 @@ void aer_enable_rootport(struct aer_rpc *rpc)
>  	reg16 &= ~(SYSTEM_ERROR_INTR_ON_MESG_MASK);
>  	pci_write_config_word(pdev, pos + PCI_EXP_RTCTL, reg16);
>  
> -	aer_pos = pci_find_aer_capability(pdev);
> +	aer_pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR);
>  	/* Clear error status */
>  	pci_read_config_dword(pdev, aer_pos + PCI_ERR_ROOT_STATUS, &reg32);
>  	pci_write_config_dword(pdev, aer_pos + PCI_ERR_ROOT_STATUS, reg32);
> @@ -578,7 +549,7 @@ static void disable_root_aer(struct aer_rpc *rpc)
>  	u32 reg32;
>  	int pos;
>  
> -	pos = pci_find_aer_capability(pdev);
> +	pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR);
>  	/* Disable Root's interrupt in response to error messages */
>  	pci_write_config_dword(pdev, pos + PCI_ERR_ROOT_COMMAND, 0);
>  
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -1567,7 +1567,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
>  			goto probe_out;
>  	}
>  
> -	if (pci_find_aer_capability(pdev))
> +	if (pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR))
>  		if (pci_enable_pcie_error_reporting(pdev))
>  			goto probe_out;
>  


-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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