scsi: zfcp: decouple TMF response handler from scsi_cmnd
authorSteffen Maier <maier@linux.ibm.com>
Thu, 17 May 2018 17:14:51 +0000 (19:14 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 18 May 2018 15:22:11 +0000 (11:22 -0400)
commit266883f2f7d505a56e2b736f80ef5c088c4c5e21
treebc5c72d89bef33bf73e497aee66784264c9dd265
parent8221211863750b1afb1f464a264c05383b077a06
scsi: zfcp: decouple TMF response handler from scsi_cmnd

Originally, I planned for TMF handling to have different context data in
fsf_req->data depending on the TMF scope in fcp_cmnd->fc_tm_flags:

 * scsi_device if FCP_TMF_LUN_RESET,
 * zfcp_port if FCP_TMF_TGT_RESET.

However, the FCP channel requires a valid LUN handle so we now use
scsi_device as context data with any TMF for the time being.

Regular SCSI I/O FCP requests continue using scsi_cmnd as req->data.

Hence, the callers of zfcp_fsf_fcp_handler_common() must resolve req->data
and pass scsi_device as common context.  While at it, remove the detour
zfcp_sdev->port->adapter and use the more direct req->adapter as elsewhere
in this function already.

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/s390/scsi/zfcp_fsf.c