Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ef768c6 authored by Jeff Skirvin's avatar Jeff Skirvin Committed by Dan Williams
Browse files

isci: Manage the IREQ_NO_AUTO_FREE_TAG under scic_lock.



Since there is a possibilty of a timeout waiting for the RNC suspension,
handle the exit case from the task termination under scic_lock, and leave
the tag allocated if the termination timed-out.

Signed-off-by: default avatarJeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent f8381807
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -243,8 +243,11 @@ enum sci_status isci_remote_device_terminate_requests(
					 idev->rnc.destination_state,
					 ireq, ireq->flags);
			}
			spin_lock_irqsave(&ihost->scic_lock, flags);
			clear_bit(IREQ_NO_AUTO_FREE_TAG, &ireq->flags);
			if (!test_bit(IREQ_ABORT_PATH_ACTIVE, &ireq->flags))
				isci_free_tag(ihost, ireq->io_tag);
			spin_unlock_irqrestore(&ihost->scic_lock, flags);
		} else {
			/* Terminate all TCs. */
			sci_remote_device_terminate_requests(idev);