Re: [RFC] use pci_find_ext_capability everywhere

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

 



On Fri, 03 Oct 2008, Jesse Barnes wrote:

> On Friday, October 3, 2008 8:39 am Jesse Barnes wrote:
> > On Friday, October 3, 2008 7:50 am Matthew Wilcox wrote:
> > > 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:
> >
> > Doh!  You caught me. :)  That's why I was careful to put [RFC] rather than
> > [PATCH] on the subject.
> >
> > But since you're looking... I'll respin and include a change to do
> > something similar to get_port_device_capability(), please check it out when
> > you get a chance.
> 
> Ok, here's an updated version that fixes the qla_os.c change (Andrew, how does
> this look?) and also fixes up the portdrv_core.c stuff (Yanmin can you take a
> look at that to see if it'll fix your problem?).


Matthew,

The interfaces changes overall look like some good clean...

As, far as the qla2xxx specific changes, if you'd like, let's just
drop the extra 'printk()' INFO and simply call
pci_enable_pcie_error_reporting().

> diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
> index 26afe44..7e79835 100644
> --- a/drivers/scsi/qla2xxx/qla_os.c
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -1567,9 +1567,8 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct 
> pci_device_id *id)
>  			goto probe_out;
>  	}
>  
> -	if (pci_find_aer_capability(pdev))
> -		if (pci_enable_pcie_error_reporting(pdev))
> -			goto probe_out;
> +	if (!pci_enable_pcie_error_reporting(pdev))
> +		printk(KERN_INFO "qla2xxx: Enabled error reporting\n");

	pci_enable_pcie_error_reporting(pdev);

>  	host = scsi_host_alloc(sht, sizeof(scsi_qla_host_t));
>  	if (host == NULL) {
--
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