On 6/27/16, 3:17 PM, "Michael Cyr" <target-devel-owner@xxxxxxxxxxxxxxx on behalf of mikecyr@xxxxxxxxxxxxxxxxxx> wrote: <SNIP> + cmd->se_cmd.tag = be64_to_cpu(srp->tag); + + spin_lock_bh(&vscsi->intr_lock); + list_add_tail(&cmd->list, &vscsi->active_q); + spin_unlock_bh(&vscsi->intr_lock); + + srp->lun.scsi_lun[0] &= 0x3f; + + pr_debug("calling submit_cmd, se_cmd %p, lun 0x%llx, cdb 0x%x, attr:%d\n", + &cmd->se_cmd, scsilun_to_int(&srp->lun), (int)srp->cdb[0], + attr); + + rc = target_submit_cmd(&cmd->se_cmd, nexus->se_sess, srp->cdb, + cmd->sense_buf, scsilun_to_int(&srp->lun), + data_len, attr, dir, 0); + if (rc) { <SNIP> + * ibmvscsis_parse_task() - Parse SRP Task Management Request + * + * Parse the srp task management request; if it is valid then submit it to tcm. + * Note: The return code does not reflect the status of the task management + * request. + * + * EXECUTION ENVIRONMENT: + * Processor level + */ +static void ibmvscsis_parse_task(struct scsi_info *vscsi, + struct ibmvscsis_cmd *cmd) +{ <SNIP> + spin_lock_bh(&vscsi->intr_lock); + list_add_tail(&cmd->list, &vscsi->active_q); + spin_unlock_bh(&vscsi->intr_lock); + + srp_tsk->lun.scsi_lun[0] &= 0x3f; + + pr_debug("calling submit_tmr, func %d\n", + srp_tsk->tsk_mgmt_func); + rc = target_submit_tmr(&cmd->se_cmd, nexus->se_sess, NULL, + scsilun_to_int(&srp_tsk->lun), srp_tsk, + tcm_type, GFP_KERNEL, tag_to_abort, 0); + if (rc) { <SNIP> I was hoping someone in the community can help answer this: If I were to remove the masking off of the lun addressing method prior to target_submit_cmd/target_submit_tmr then I get a hang within scsi probe on bootup. (srp->lun.scsi_lun[0] &= 0x3f; and srp_tsk->lun.scsi_lun[0] &= 0x3f;) [ 0.842648] ibmvscsi 3000000d: sent SRP login [ 0.842667] ibmvscsi 3000000d: SRP_LOGIN succeeded [ 0.842682] scsi 0:0:2:0: CD-ROM AIX VOPTA PQ: 0 ANSI: 4 [ OK ] Started Show Plymouth Boot Screen. [ OK ] Reached target Paths. [ OK ] Reached target Basic System. [ 0.886179] sr 0:0:2:0: [sr0] scsi-1 drive [ 0.886199] cdrom: Uniform CD-ROM driver Revision: 3.20 [ 0.888582] sd 0:0:1:0: [sda] 41943040 512-byte logical blocks: (21.4 GB/20.0 GiB) [ 0.888657] sd 0:0:1:0: [sda] Write Protect is off [ 0.888712] sd 0:0:1:0: [sda] Cache data unavailable [ 0.888722] sd 0:0:1:0: [sda] Assuming drive cache: write through [ 0.901443] sda: sda1 sda2 sda3 [ 0.901838] sd 0:0:1:0: [sda] Attached SCSI disk [ 124.522778] dracut-initqueue[353]: Warning: dracut-initqueue timeout - starting timeout scripts [ 125.151242] dracut-initqueue[353]: Warning: dracut-initqueue timeout - starting timeout scripts [ 125.662808] dracut-initqueue[353]: Warning: dracut-initqueue timeout - starting timeout scripts Does anyone know of the reasoning for having to mask off the addressing method prior to submitting to target? Thanks, Bryant -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html