History

scsi: lpfc: Fix missing wakeups on abort threads

Abort thread wakeups, on some wqe types, are not happening. The thread wakeup logic is dependent upon the LPFC_DRIVER_ABORTED flag. However, on these wqes, the completion handler running prior to the io completion routine ends up clearing the flag. Rework the wakeup logic to look at a non-null waitq element which must be set if the abort thread is waiting. This is reverting the change in the indicated patch.

James Smart committed 7 years ago

Commit 4eb01531 parent ed2e63a1 file · +3 −4Browse files

Unified · Split

drivers/scsi/lpfc/lpfc_scsi.c+3−4
@@ -3878,10 +3878,9 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, · 3877 unmodified lines
38783878 * wake up the thread.
38793879 */
38803880 spin_lock(&lpfc_cmd->buf_lock);
3881− if (unlikely(lpfc_cmd->cur_iocbq.iocb_flag & LPFC_DRIVER_ABORTED)) {
3882− lpfc_cmd->cur_iocbq.iocb_flag &= ~LPFC_DRIVER_ABORTED;
3883− if (lpfc_cmd->waitq)
3884− wake_up(lpfc_cmd->waitq);
3881+ lpfc_cmd->cur_iocbq.iocb_flag &= ~LPFC_DRIVER_ABORTED;
3882+ if (lpfc_cmd->waitq) {
3883+ wake_up(lpfc_cmd->waitq);
38853884 lpfc_cmd->waitq = NULL;
38863885 }
38873886 spin_unlock(&lpfc_cmd->buf_lock);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t