mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
qcacmn: Do not access bus in suspend_noirq
The WLAN suspend process has three phases: 1) protocol suspend 2) bus suspend 3) bus suspend, no-irq Currently, it is assumed by the WLAN driver that the bus will not be put down until after step 3. Moving forward, however, the PCIe driver will be putting the bus link down between steps 2 and 3. In order to accommodate this, move flushing the tasklets to phase 2, up from phase 3. This will ensure the WLAN driver is done accessing the bus before the PCIe driver puts it down. Change-Id: I47a22b7fd940ddc1bad78265b59461c178ee7ad4 CRs-Fixed: 2423628
This commit is contained in:
parent
a8edf330f0
commit
13835b1aa2
1 changed files with 21 additions and 4 deletions
|
|
@ -2532,8 +2532,16 @@ void hif_pci_prevent_linkdown(struct hif_softc *scn, bool flag)
|
|||
*/
|
||||
int hif_pci_bus_suspend(struct hif_softc *scn)
|
||||
{
|
||||
hif_apps_irqs_disable(GET_HIF_OPAQUE_HDL(scn));
|
||||
|
||||
if (hif_drain_tasklets(scn)) {
|
||||
hif_apps_irqs_enable(GET_HIF_OPAQUE_HDL(scn));
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
/* Stop the HIF Sleep Timer */
|
||||
hif_cancel_deferred_target_sleep(scn);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2583,7 +2591,15 @@ static int __hif_check_link_status(struct hif_softc *scn)
|
|||
*/
|
||||
int hif_pci_bus_resume(struct hif_softc *scn)
|
||||
{
|
||||
return __hif_check_link_status(scn);
|
||||
int errno;
|
||||
|
||||
errno = __hif_check_link_status(scn);
|
||||
if (errno)
|
||||
return errno;
|
||||
|
||||
hif_apps_irqs_enable(GET_HIF_OPAQUE_HDL(scn));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2597,12 +2613,11 @@ int hif_pci_bus_resume(struct hif_softc *scn)
|
|||
*/
|
||||
int hif_pci_bus_suspend_noirq(struct hif_softc *scn)
|
||||
{
|
||||
if (hif_drain_tasklets(scn) != 0)
|
||||
return -EBUSY;
|
||||
|
||||
if (hif_can_suspend_link(GET_HIF_OPAQUE_HDL(scn)))
|
||||
qdf_atomic_set(&scn->link_suspended, 1);
|
||||
|
||||
hif_apps_wake_irq_enable(GET_HIF_OPAQUE_HDL(scn));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2617,6 +2632,8 @@ int hif_pci_bus_suspend_noirq(struct hif_softc *scn)
|
|||
*/
|
||||
int hif_pci_bus_resume_noirq(struct hif_softc *scn)
|
||||
{
|
||||
hif_apps_wake_irq_disable(GET_HIF_OPAQUE_HDL(scn));
|
||||
|
||||
if (hif_can_suspend_link(GET_HIF_OPAQUE_HDL(scn)))
|
||||
qdf_atomic_set(&scn->link_suspended, 0);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue