Re: [PATCH 00/16] scsi: libsas and users: Factor out LLDD TMF code

From: John Garry
Date: Mon Feb 07 2022 - 08:16:02 EST


Hi Damien,

On 04/02/2022 03:02, Damien Le Moal wrote:
This is the submission path, not completion. The code is:

(gdb) list *(pm8001_queue_command+0x842)
0x3d42 is in pm8001_queue_command (drivers/scsi/pm8001/pm8001_sas.c:491).
486 atomic_dec(&pm8001_dev->running_req);
487 goto err_out_tag;
488 }
489 /* TODO: select normal or high priority */
490 spin_lock(&t->task_state_lock);
491 t->task_state_flags |= SAS_TASK_AT_INITIATOR;
492 spin_unlock(&t->task_state_lock);
493 } while (0);
494 rc = 0;
495 goto out_done;

So the task is already completed when the submission path tries to set
the state flag ? Debugging...

JFYI, I am putting together a patch to drop SAS_TASK_AT_INITIATOR altogether. I just need to ensure that the logic in the isci code is correct.

Thanks,
John