From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
To: linux-pci@vger.kernel.org
Cc: bhelgaas@google.com, lpieralisi@kernel.org, robh@kernel.org,
kw@linux.com, matthias.bgg@gmail.com,
linux-kernel@vger.kernel.org
Subject: [PATCH] PCI: mt7621: Sleep a bit after power on the PCIs phy ports
Date: Fri, 9 Dec 2022 08:17:03 +0100 [thread overview]
Message-ID: <20221209071703.2891714-1-sergio.paracuellos@gmail.com> (raw)
Some devices like ZBT WE1326 and ZBT WF3526-P need to sleep a bit after call
to mt7621_pcie_init_port() driver function to get into reliable boots for
both warn and hard resets. The needed time for these devices to always detect
the ports seems to be from 75 to 100 milliseconds. Hence, properly add an
extra 100 milliseconds msleep() call to make also these devices work.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
Hi Bjorn / Lorenzo,
I send previous patch here [0] related with this issue. Since after a bit
of testing with these devices by openwrt community [1] we end up that there is
no need of increasing PERST_DELAY_MS definition. This is also the reason
of not sending a v2 for this but a new patch with the proper solution.
I preferred to just use the same PERST_DELAY_MS define also for this to
not perform extra changes but the needed to the driver. If you prefer
me to write new definitions for all the sleep paths you pointed out in
[0], just let me know and I will send them also.
Thanks in advance for your time.
Best regards,
Sergio Paracuellos
[0]: https://lore.kernel.org/linux-pci/20221119110837.2419466-1-sergio.paracuellos@gmail.com/T/#u
[1]: https://github.com/openwrt/openwrt/pull/11220
drivers/pci/controller/pcie-mt7621.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c
index 4bd1abf26008..3311ca64b315 100644
--- a/drivers/pci/controller/pcie-mt7621.c
+++ b/drivers/pci/controller/pcie-mt7621.c
@@ -369,6 +369,7 @@ static int mt7621_pcie_init_ports(struct mt7621_pcie *pcie)
}
}
+ msleep(PERST_DELAY_MS);
mt7621_pcie_reset_ep_deassert(pcie);
tmp = NULL;
--
2.25.1
next reply other threads:[~2022-12-09 7:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-09 7:17 Sergio Paracuellos [this message]
2022-12-30 14:23 ` Lorenzo Pieralisi
2022-12-30 14:42 ` Sergio Paracuellos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221209071703.2891714-1-sergio.paracuellos@gmail.com \
--to=sergio.paracuellos@gmail.com \
--cc=bhelgaas@google.com \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®