/**
  * lpfc_send_taskmgmt - Generic SCSI Task Mgmt Handler
  * @vport: The virtual port for which this call is being executed.
- * @cmnd: Pointer to scsi_cmnd data structure.
+ * @rport: Pointer to remote port
  * @tgt_id: Target ID of remote device.
  * @lun_id: Lun number for the TMF
  * @task_mgmt_cmd: type of TMF to send
  *   0x2002 - Success.
  **/
 static int
-lpfc_send_taskmgmt(struct lpfc_vport *vport, struct scsi_cmnd *cmnd,
+lpfc_send_taskmgmt(struct lpfc_vport *vport, struct fc_rport *rport,
                   unsigned int tgt_id, uint64_t lun_id,
                   uint8_t task_mgmt_cmd)
 {
        int ret;
        int status;
 
-       rdata = lpfc_rport_data_from_scsi_device(cmnd->device);
+       rdata = rport->dd_data;
        if (!rdata || !rdata->pnode)
                return FAILED;
        pnode = rdata->pnode;
                return FAILED;
        lpfc_cmd->timeout = phba->cfg_task_mgmt_tmo;
        lpfc_cmd->rdata = rdata;
-       lpfc_cmd->pCmd = cmnd;
+       lpfc_cmd->pCmd = NULL;
        lpfc_cmd->ndlp = pnode;
 
        status = lpfc_scsi_prep_task_mgmt_cmd(vport, lpfc_cmd, lun_id,
        fc_host_post_vendor_event(shost, fc_get_event_number(),
                sizeof(scsi_event), (char *)&scsi_event, LPFC_NL_VENDOR_ID);
 
-       status = lpfc_send_taskmgmt(vport, cmnd, tgt_id, lun_id,
+       status = lpfc_send_taskmgmt(vport, rport, tgt_id, lun_id,
                                                FCP_LUN_RESET);
        if (status != SUCCESS)
                logit =  LOG_TRACE_EVENT;
        fc_host_post_vendor_event(shost, fc_get_event_number(),
                sizeof(scsi_event), (char *)&scsi_event, LPFC_NL_VENDOR_ID);
 
-       status = lpfc_send_taskmgmt(vport, cmnd, tgt_id, lun_id,
+       status = lpfc_send_taskmgmt(vport, rport, tgt_id, lun_id,
                                        FCP_TARGET_RESET);
        if (status != SUCCESS) {
                logit = LOG_TRACE_EVENT;