aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_bsg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_bsg.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_bsg.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index 0dd43bb91618..5a4a2f36ae6d 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -2479,16 +2479,18 @@ lpfc_bsg_wake_mbox_wait(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmboxq)
2479 2479
2480 from = (uint8_t *)dd_data->context_un.mbox.mb; 2480 from = (uint8_t *)dd_data->context_un.mbox.mb;
2481 job = dd_data->context_un.mbox.set_job; 2481 job = dd_data->context_un.mbox.set_job;
2482 size = job->reply_payload.payload_len; 2482 if (job) {
2483 job->reply->reply_payload_rcv_len = 2483 size = job->reply_payload.payload_len;
2484 sg_copy_from_buffer(job->reply_payload.sg_list, 2484 job->reply->reply_payload_rcv_len =
2485 job->reply_payload.sg_cnt, 2485 sg_copy_from_buffer(job->reply_payload.sg_list,
2486 from, size); 2486 job->reply_payload.sg_cnt,
2487 job->reply->result = 0; 2487 from, size);
2488 job->reply->result = 0;
2488 2489
2490 job->dd_data = NULL;
2491 job->job_done(job);
2492 }
2489 dd_data->context_un.mbox.set_job = NULL; 2493 dd_data->context_un.mbox.set_job = NULL;
2490 job->dd_data = NULL;
2491 job->job_done(job);
2492 /* need to hold the lock until we call job done to hold off 2494 /* need to hold the lock until we call job done to hold off
2493 * the timeout handler returning to the midlayer while 2495 * the timeout handler returning to the midlayer while
2494 * we are stillprocessing the job 2496 * we are stillprocessing the job