[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <78225d7f-5c2d-1cc3-8132-79a703b3b565@quicinc.com>
Date: Fri, 8 Sep 2023 10:13:38 +0530
From: Krishna Chaitanya Chundru <quic_krichai@...cinc.com>
To: Bjorn Helgaas <helgaas@...nel.org>
CC: <manivannan.sadhasivam@...aro.org>, <linux-pci@...r.kernel.org>,
<linux-arm-msm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<quic_vbadigan@...cinc.com>, <quic_nitegupt@...cinc.com>,
<quic_skananth@...cinc.com>, <quic_ramkri@...cinc.com>,
<quic_parass@...cinc.com>, <krzysztof.kozlowski@...aro.org>,
"Manivannan Sadhasivam" <mani@...nel.org>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof WilczyĆski <kw@...ux.com>,
Rob Herring <robh@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [PATCH v5 3/4] PCI: qcom-ep: Update the D-state log
On 8/3/2023 11:28 PM, Bjorn Helgaas wrote:
> In subject:
>
> PCI: qcom-ep: Print D-state name to distinguish D3hot/D3cold
>
> ("Update" doesn't give any hint about what the change does.)
I will update it as suggested.
> On Wed, Aug 02, 2023 at 09:21:20AM +0530, Krishna chaitanya chundru wrote:
>> Now that the state event is stored as pci_power_t, let's use the PCI helper
>> pci_power_name() to print the state event.
> s/let's use/use/
>
> The main change is this, right?
>
> D3 -> D3hot
> D4 -> D3cold
Yes this is the main change.
>> Signed-off-by: Krishna chaitanya chundru <quic_krichai@...cinc.com>
>> ---
>> drivers/pci/controller/dwc/pcie-qcom-ep.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c
>> index 22545ff..0c69a61 100644
>> --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c
>> +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c
>> @@ -583,7 +583,6 @@ static irqreturn_t qcom_pcie_ep_global_irq_thread(int irq, void *data)
>> } else if (FIELD_GET(PARF_INT_ALL_DSTATE_CHANGE, status)) {
>> dstate = dw_pcie_readl_dbi(pci, DBI_CON_STATUS) &
>> DBI_CON_STATUS_POWER_STATE_MASK;
>> - dev_dbg(dev, "Received D%d state event\n", dstate);
>> state = dstate;
>> if (dstate == 3) {
> Can this check for "state == PCI_D3hot" to be clearer?
I will modify this.
>
>> val = readl_relaxed(pcie_ep->parf + PARF_PM_CTRL);
>> @@ -594,6 +593,7 @@ static irqreturn_t qcom_pcie_ep_global_irq_thread(int irq, void *data)
>> if (gpiod_get_value(pcie_ep->reset))
>> state = PCI_D3cold;
>> }
>> + dev_dbg(dev, "Received %s event\n", pci_power_name(state));
> Not really sure why this needs to be moved (the diff would be clearer
> if it stayed in the same spot), but it doesn't look like it really
> matters.
As we know if the link is in D3hot or D3cold moving the log here so that
we can log correct Dstate.
- KC
>> pci_epc_dstate_notify(pci->ep.epc, state);
>> } else if (FIELD_GET(PARF_INT_ALL_LINK_UP, status)) {
>> dev_dbg(dev, "Received Linkup event. Enumeration complete!\n");
>> --
>> 2.7.4
>>
Powered by blists - more mailing lists