mirror of
https://github.com/torvalds/linux.git
synced 2026-09-14 16:10:02 +02:00
scsi: ibmvfc: add NVMe/FC Query Target support
Add protocol-specific query-target support for NVMe/FC targets. Use the NVMe query-target specific MAD when querying an NVMe target and update the associated debug and error logging to include the target protocol. Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com> Link: https://patch.msgid.link/20260723000149.969416-20-tyreld@linux.ibm.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
d11c05ddc2
commit
5bdeab3c14
|
|
@ -4859,7 +4859,7 @@ static void ibmvfc_tgt_query_target_done(struct ibmvfc_event *evt)
|
|||
ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_NONE);
|
||||
switch (status) {
|
||||
case IBMVFC_MAD_SUCCESS:
|
||||
tgt_dbg(tgt, "Query Target succeeded\n");
|
||||
tgt_dbg(tgt, "%s Query Target succeeded\n", proto_type[tgt->protocol]);
|
||||
if (be64_to_cpu(rsp->scsi_id) != tgt->scsi_id)
|
||||
ibmvfc_del_tgt(tgt);
|
||||
else
|
||||
|
|
@ -4881,9 +4881,9 @@ static void ibmvfc_tgt_query_target_done(struct ibmvfc_event *evt)
|
|||
else
|
||||
ibmvfc_del_tgt(tgt);
|
||||
|
||||
tgt_log(tgt, level, "Query Target failed: %s (%x:%x) %s (%x) %s (%x) rc=0x%02X\n",
|
||||
ibmvfc_get_cmd_error(be16_to_cpu(rsp->status), be16_to_cpu(rsp->error)),
|
||||
be16_to_cpu(rsp->status), be16_to_cpu(rsp->error),
|
||||
tgt_log(tgt, level, "%s Query Target failed: %s (%x:%x) %s (%x) %s (%x) rc=0x%02X\n",
|
||||
proto_type[tgt->protocol], ibmvfc_get_cmd_error(be16_to_cpu(rsp->status),
|
||||
be16_to_cpu(rsp->error)), be16_to_cpu(rsp->status), be16_to_cpu(rsp->error),
|
||||
ibmvfc_get_fc_type(be16_to_cpu(rsp->fc_type)), be16_to_cpu(rsp->fc_type),
|
||||
ibmvfc_get_gs_explain(be16_to_cpu(rsp->fc_explain)), be16_to_cpu(rsp->fc_explain),
|
||||
status);
|
||||
|
|
@ -4923,7 +4923,10 @@ static void ibmvfc_tgt_query_target(struct ibmvfc_target *tgt)
|
|||
query_tgt = &evt->iu.query_tgt;
|
||||
memset(query_tgt, 0, sizeof(*query_tgt));
|
||||
query_tgt->common.version = cpu_to_be32(1);
|
||||
query_tgt->common.opcode = cpu_to_be32(IBMVFC_QUERY_TARGET);
|
||||
if (tgt->protocol == IBMVFC_PROTO_SCSI)
|
||||
query_tgt->common.opcode = cpu_to_be32(IBMVFC_QUERY_TARGET);
|
||||
else
|
||||
query_tgt->common.opcode = cpu_to_be32(IBMVFC_NVMF_QUERY_TARGET);
|
||||
query_tgt->common.length = cpu_to_be16(sizeof(*query_tgt));
|
||||
query_tgt->wwpn = cpu_to_be64(tgt->ids.port_name);
|
||||
|
||||
|
|
@ -4933,7 +4936,7 @@ static void ibmvfc_tgt_query_target(struct ibmvfc_target *tgt)
|
|||
ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_NONE);
|
||||
kref_put(&tgt->kref, ibmvfc_release_tgt);
|
||||
} else
|
||||
tgt_dbg(tgt, "Sent Query Target\n");
|
||||
tgt_dbg(tgt, "Sent %s Query Target\n", proto_type[tgt->protocol]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user