mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
msm:pci: Usage of disable_pc in multiclient scenario
In PCIe driver disable power collapse is a bool variable, this causes problem in multi client scenario as there is no vote aggregation. This Change is to support enable/disable power collapse in multi client envirnoment. Change-Id: Ib126958a18c4be831bf2b993e3a96eaae1a59435 Signed-off-by: Ramya SR <rsr@codeaurora.org>
This commit is contained in:
parent
3c9afc139b
commit
f9f4c25c5b
1 changed files with 10 additions and 7 deletions
|
|
@ -790,7 +790,7 @@ struct msm_pcie_dev_t {
|
|||
|
||||
enum msm_pcie_link_status link_status;
|
||||
bool user_suspend;
|
||||
bool disable_pc;
|
||||
uint32_t disable_pc;
|
||||
|
||||
struct pci_saved_state *default_state;
|
||||
struct pci_saved_state *saved_state;
|
||||
|
|
@ -7973,8 +7973,8 @@ int msm_pcie_pm_control(enum msm_pcie_pm_opt pm_opt, u32 busnr, void *user,
|
|||
break;
|
||||
case MSM_PCIE_DISABLE_PC:
|
||||
PCIE_DBG(pcie_dev,
|
||||
"User of RC%d requests to keep the link always alive.\n",
|
||||
pcie_dev->rc_idx);
|
||||
"User of RC%d with vendor_id:0x%x device_id:0x%x requests to keep the link always alive.\n",
|
||||
pcie_dev->rc_idx, pcidev->vendor, pcidev->device);
|
||||
spin_lock_irqsave(&pcie_dev->cfg_lock, pcie_dev->irqsave_flags);
|
||||
if (pcie_dev->suspending) {
|
||||
PCIE_ERR(pcie_dev,
|
||||
|
|
@ -7982,17 +7982,20 @@ int msm_pcie_pm_control(enum msm_pcie_pm_opt pm_opt, u32 busnr, void *user,
|
|||
pcie_dev->rc_idx);
|
||||
ret = MSM_PCIE_ERROR;
|
||||
} else {
|
||||
pcie_dev->disable_pc = true;
|
||||
pcie_dev->disable_pc++;
|
||||
}
|
||||
spin_unlock_irqrestore(&pcie_dev->cfg_lock,
|
||||
pcie_dev->irqsave_flags);
|
||||
break;
|
||||
case MSM_PCIE_ENABLE_PC:
|
||||
PCIE_DBG(pcie_dev,
|
||||
"User of RC%d cancels the request of alive link.\n",
|
||||
pcie_dev->rc_idx);
|
||||
"User of RC%d with vendor_id:0x%x device_id:0x%x cancels the request of alive link.\n",
|
||||
pcie_dev->rc_idx, pcidev->vendor, pcidev->device);
|
||||
spin_lock_irqsave(&pcie_dev->cfg_lock, pcie_dev->irqsave_flags);
|
||||
pcie_dev->disable_pc = false;
|
||||
if (pcie_dev->disable_pc > 0)
|
||||
pcie_dev->disable_pc--;
|
||||
else
|
||||
PCIE_ERR(pcie_dev, "PCIe:RC%d cannot call ENABLE_PC", pcie_dev->rc_idx);
|
||||
spin_unlock_irqrestore(&pcie_dev->cfg_lock,
|
||||
pcie_dev->irqsave_flags);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue