ibmvfc: byteswap scsi_id, wwpn, and node_name prior to logging
Subsystems (3)
PATCH 1/1 ibmvfc: byteswap scsi_id, wwpn, and node_name prior to logging
When logging async events the scsi_id, wwpn, and node_name values are used directly from the CRQ struct which are of type __be64. This can be confusing to someone looking through the log on a LE system. Instead byteswap these values to host endian prior to logging.
--- drivers/scsi/ibmvscsi/ibmvfc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/ibmvscsi/ibmvfc.c +2 -1
@@ -2636,7 +2636,8 @@ static void ibmvfc_handle_async(struct ibmvfc_async_crq *crq,struct ibmvfc_target *tgt;ibmvfc_log (vhost, desc->log_level,"%s event received. scsi_id: %llx, wwpn: %llx," -" node_name: %llx%s\n" , desc->desc, crq->scsi_id, crq->wwpn, crq->node_name, +" node_name: %llx%s\n" , desc->desc,be64_to_cpu (crq->scsi_id), +be64_to_cpu (crq->wwpn),be64_to_cpu (crq->node_name),ibmvfc_get_link_state (crq->link_state));switch (be64_to_cpu (crq->event)) {
Signature · 1 line
2.5.0
Quoted 6 lines · Tyrel Datwyler
When logging async events the
scsi_id, wwpn, andnode_namevalues are used directly from the CRQ struct which are of type__be64. This can be confusing to someone looking through the log on a LE system. Instead byteswap these values to host endian prior to logging.Signed-off-by Tyrel Datwyler <[email protected]>
Signature · 10 lines
Johannes Thumshirn Storage [email protected] +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Martin K. Petersen
AppliedQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Tyrel" == Tyrel Datwyler <[email protected]> writes:
Tyrel> When logging async events the scsi_id, wwpn, and node_name values Tyrel> are used directly from the CRQ struct which are of type Tyrel> __be64. This can be confusing to someone looking through the log Tyrel> on a LE system. Instead byteswap these values to host endian Tyrel> prior to logging.
Applied to 4.6/scsi-queue.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering