Re: [PATCH v2 2/2] PCI / ACPI: PCI delay optimization from ACPI

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

 



On Tue, Mar 24, 2015 at 11:37:03PM +0800, Aaron Lu wrote:
> On 03/24/2015 10:08 PM, Bjorn Helgaas wrote:
> > On Tue, Mar 24, 2015 at 05:04:58PM +0800, Aaron Lu wrote:
> >> @@ -575,6 +637,9 @@ static void pci_acpi_setup(struct device *dev)
> >>  	if (!adev)
> >>  		return;
> >>  
> >> +	if (pci_dev->pm_cap)
> >> +		pci_acpi_delay_optimize(pci_dev, adev->handle);
> > 
> > Is the "pm_cap" test really necessary?  If we do it this way, we then have
> > to convince ourselves that pdev->d3cold_delay and pdev->d3_delay are only
> > needed when pdev has a pm_cap.
> > 
> > If we *always* fill in the delay values, it's possible they won't be used,
> > but we don't have to prove any connection between them and a pm_cap, so
> > the code is easier to analyze.
> 
> I remembered why I did the pm_cap test: the d3cold_delay and d3_delay is
> only filled when pm_cap is set in pci_pm_init - if the device doesn't
> have PCI_CAP_ID_PM set, its pm_cap will be 0 and d3cold_delay, d3_delay
> will not be assigned.

Yes, that's true, so I can see why you'd test pm_cap here, too.  But I
don't think it's necessary to propagate that connection here, so I'd omit
the test.

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux