Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions drivers/net/wireless/apple/centauri/t6050/centauri_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,15 @@ static int centauri_t6050_quiesce(struct centauri_t6050 *c)
centauri_t6050_free_irqs(&c->irqs);
c->firmware_sleep = true;
c->boot_phase = CEN_BOOT_STOPPED;
if (!ret && (!centauri_t6050_domain_fence(c->recovery) ||
!centauri_t6050_ipc_fenced(c->ipc)))
/*
* A completed teardown already released every published DMA tuple. After
* the host resets N1, the old Alpha/Beta PCI devices can still exist in
* software while only Control is visible in ROM. Do not fence those
* retired functions again unless there is backing left to release.
*/
if (!ret && (c->ipc || c->firmware || c->descriptor || c->recovery->arena) &&
(!centauri_t6050_domain_fence(c->recovery) ||
!centauri_t6050_ipc_fenced(c->ipc)))
ret = -EBUSY;
mutex_unlock(&c->boot_lock);
if (!ret)
Expand Down Expand Up @@ -824,8 +831,10 @@ static int centauri_t6050_rewake_teardown(struct centauri_t6050_rewake *rw)
/* F0 may have unbound already; the independent owner holds its resources. */
if (!ret)
ret = centauri_t6050_beta_call(rw, false);
if (!ret && (!centauri_t6050_domain_fence(rw) ||
!centauri_t6050_ipc_fenced(rw->ipc)))
/* The independent owner needs a fence only for tuples it still holds. */
if (!ret && (rw->ipc || rw->firmware || rw->descriptor || rw->arena) &&
(!centauri_t6050_domain_fence(rw) ||
!centauri_t6050_ipc_fenced(rw->ipc)))
ret = -EBUSY;
if (!ret)
ret = centauri_t6050_beta_call(rw, true);
Expand Down
Loading
Loading