msm: ep_pcie: Update PERST status when BME is not set

During customer testing, when host is in BIOS stage during critical
battery level device boots up till AMSS. We get a BME IRQ fired, but
BME is no set as host has bailed out enumeration process due to
critical battery level. This is followed by a PERST assert, in
disable_endpoint we bail out as the PERST is in de-asserted state
according to the status variable, though the actual line status
is assert. The host then continuosly tries to do PERST
assert/de-assert but we never end up doing link training as from
device perspective the link is already initialized state.

Adding change to update PERST status in case of BME not getting set.
This helps in disable_endpoint to happen followed by successful link
training.

Change-Id: Idd576f4cb0ab649b5aa86e6b1d2cdea204218878
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
This commit is contained in:
Gauri Joshi 2020-08-28 12:31:40 +05:30
commit fcdc535806

View file

@ -2329,6 +2329,7 @@ static irqreturn_t ep_pcie_handle_perst_irq(int irq, void *data)
EP_PCIE_DBG(dev,
"PCIe V%d: PCIe is not enumerated yet; PERST is %sasserted\n",
dev->rev, perst ? "de" : "");
atomic_set(&dev->perst_deast, perst ? 1 : 0);
if (perst) {
/*
* Hold a wakelock to avoid delay during