Skip to content

Commit

Permalink
IB/hfi1: Handle wakeup of orphaned QPs for pio
Browse files Browse the repository at this point in the history
Once a send context is taken down due to a link failure, any QPs waiting
for pio credits will stay on the waitlist indefinitely.

Fix by wakeing up all QPs linked to piowait list.

Fixes: 7724105 ("IB/hfi1: add driver files")
Reviewed-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Mike Marciniszyn <[email protected]>
Signed-off-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
  • Loading branch information
mmarcini authored and Doug Ledford committed Jun 18, 2019
1 parent f972775 commit 099a884
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions drivers/infiniband/hw/hfi1/pio.c
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,22 @@ void sc_disable(struct send_context *sc)
}
}
spin_unlock(&sc->release_lock);

write_seqlock(&sc->waitlock);
while (!list_empty(&sc->piowait)) {
struct iowait *wait;
struct rvt_qp *qp;
struct hfi1_qp_priv *priv;

wait = list_first_entry(&sc->piowait, struct iowait, list);
qp = iowait_to_qp(wait);
priv = qp->priv;
list_del_init(&priv->s_iowait.list);
priv->s_iowait.lock = NULL;
hfi1_qp_wakeup(qp, RVT_S_WAIT_PIO | HFI1_S_WAIT_PIO_DRAIN);
}
write_sequnlock(&sc->waitlock);

spin_unlock_irq(&sc->alloc_lock);
}

Expand Down

0 comments on commit 099a884

Please sign in to comment.