mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
cnss2: Add new flag to check drv support
There is illegal logic when call cnss_pci_suspend and check DRV support. This change adds new flag - drv_supported to replace cnss_pci_get_drv_connected and fixes this issue. Change-Id: Ia836e06283ebe08483e325717fb30bac333ef5b7 Signed-off-by: Wu Gao <wugao@codeaurora.org>
This commit is contained in:
parent
629f831242
commit
dfdff0e7fd
2 changed files with 5 additions and 2 deletions
|
|
@ -2912,6 +2912,7 @@ static bool cnss_pci_is_drv_supported(struct cnss_pci_data *pci_priv)
|
|||
|
||||
if (!root_port) {
|
||||
cnss_pr_err("PCIe DRV is not supported as root port is null\n");
|
||||
pci_priv->drv_supported = false;
|
||||
return drv_supported;
|
||||
}
|
||||
|
||||
|
|
@ -2923,6 +2924,7 @@ static bool cnss_pci_is_drv_supported(struct cnss_pci_data *pci_priv)
|
|||
|
||||
cnss_pr_dbg("PCIe DRV is %s\n",
|
||||
drv_supported ? "supported" : "not supported");
|
||||
pci_priv->drv_supported = drv_supported;
|
||||
|
||||
return drv_supported;
|
||||
}
|
||||
|
|
@ -3160,7 +3162,7 @@ static int cnss_pci_suspend(struct device *dev)
|
|||
goto out;
|
||||
|
||||
if (!test_bit(DISABLE_DRV, &plat_priv->ctrl_params.quirks) &&
|
||||
cnss_pci_get_drv_connected(pci_priv)) {
|
||||
pci_priv->drv_supported) {
|
||||
pci_priv->drv_connected_last =
|
||||
cnss_pci_get_drv_connected(pci_priv);
|
||||
if (!pci_priv->drv_connected_last) {
|
||||
|
|
@ -3303,7 +3305,7 @@ static int cnss_pci_runtime_suspend(struct device *dev)
|
|||
}
|
||||
|
||||
if (!test_bit(DISABLE_DRV, &plat_priv->ctrl_params.quirks) &&
|
||||
cnss_pci_get_drv_connected(pci_priv)) {
|
||||
pci_priv->drv_supported) {
|
||||
pci_priv->drv_connected_last =
|
||||
cnss_pci_get_drv_connected(pci_priv);
|
||||
if (!pci_priv->drv_connected_last) {
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@ struct cnss_pci_data {
|
|||
struct cnss_misc_reg *wlaon_reg;
|
||||
u32 wlaon_reg_size;
|
||||
u8 iommu_geometry;
|
||||
bool drv_supported;
|
||||
};
|
||||
|
||||
static inline void cnss_set_pci_priv(struct pci_dev *pci_dev, void *data)
|
||||
|
|
|
|||
Loading…
Reference in a new issue