lpfc_bsg.c (75cc8cfc6e13d42d50c2bf4307d0a68c2a70f709) | lpfc_bsg.c (06548160dfecd1983ffd9d6795242a5cda095da5) |
---|---|
1/******************************************************************* 2 * This file is part of the Emulex Linux Device Driver for * 3 * Fibre Channel Host Bus Adapters. * 4 * Copyright (C) 2009-2015 Emulex. All rights reserved. * 5 * EMULEX and SLI are trademarks of Emulex. * 6 * www.emulex.com * 7 * * 8 * This program is free software; you can redistribute it and/or * --- 357 unchanged lines hidden (view full) --- 366 lpfc_sli_release_iocbq(phba, cmdiocbq); 367 lpfc_nlp_put(ndlp); 368 kfree(dd_data); 369 370 /* Complete the job if the job is still active */ 371 372 if (job) { 373 bsg_reply->result = rc; | 1/******************************************************************* 2 * This file is part of the Emulex Linux Device Driver for * 3 * Fibre Channel Host Bus Adapters. * 4 * Copyright (C) 2009-2015 Emulex. All rights reserved. * 5 * EMULEX and SLI are trademarks of Emulex. * 6 * www.emulex.com * 7 * * 8 * This program is free software; you can redistribute it and/or * --- 357 unchanged lines hidden (view full) --- 366 lpfc_sli_release_iocbq(phba, cmdiocbq); 367 lpfc_nlp_put(ndlp); 368 kfree(dd_data); 369 370 /* Complete the job if the job is still active */ 371 372 if (job) { 373 bsg_reply->result = rc; |
374 fc_bsg_jobdone(job, bsg_reply->result, | 374 bsg_job_done(job, bsg_reply->result, |
375 bsg_reply->reply_payload_rcv_len); 376 } 377 return; 378} 379 380/** 381 * lpfc_bsg_send_mgmt_cmd - send a CT command from a bsg request 382 * @job: fc_bsg_job to handle --- 257 unchanged lines hidden (view full) --- 640 lpfc_nlp_put(ndlp); 641 lpfc_els_free_iocb(phba, cmdiocbq); 642 kfree(dd_data); 643 644 /* Complete the job if the job is still active */ 645 646 if (job) { 647 bsg_reply->result = rc; | 375 bsg_reply->reply_payload_rcv_len); 376 } 377 return; 378} 379 380/** 381 * lpfc_bsg_send_mgmt_cmd - send a CT command from a bsg request 382 * @job: fc_bsg_job to handle --- 257 unchanged lines hidden (view full) --- 640 lpfc_nlp_put(ndlp); 641 lpfc_els_free_iocb(phba, cmdiocbq); 642 kfree(dd_data); 643 644 /* Complete the job if the job is still active */ 645 646 if (job) { 647 bsg_reply->result = rc; |
648 fc_bsg_jobdone(job, bsg_reply->result, | 648 bsg_job_done(job, bsg_reply->result, |
649 bsg_reply->reply_payload_rcv_len); 650 } 651 return; 652} 653 654/** 655 * lpfc_bsg_rport_els - send an ELS command from a bsg request 656 * @job: fc_bsg_job to handle --- 476 unchanged lines hidden (view full) --- 1133 if (job) { 1134 bsg_reply = job->reply; 1135 bsg_reply->reply_payload_rcv_len = size; 1136 /* make error code available to userspace */ 1137 bsg_reply->result = 0; 1138 job->dd_data = NULL; 1139 /* complete the job back to userspace */ 1140 spin_unlock_irqrestore(&phba->ct_ev_lock, flags); | 649 bsg_reply->reply_payload_rcv_len); 650 } 651 return; 652} 653 654/** 655 * lpfc_bsg_rport_els - send an ELS command from a bsg request 656 * @job: fc_bsg_job to handle --- 476 unchanged lines hidden (view full) --- 1133 if (job) { 1134 bsg_reply = job->reply; 1135 bsg_reply->reply_payload_rcv_len = size; 1136 /* make error code available to userspace */ 1137 bsg_reply->result = 0; 1138 job->dd_data = NULL; 1139 /* complete the job back to userspace */ 1140 spin_unlock_irqrestore(&phba->ct_ev_lock, flags); |
1141 fc_bsg_jobdone(job, bsg_reply->result, | 1141 bsg_job_done(job, bsg_reply->result, |
1142 bsg_reply->reply_payload_rcv_len); 1143 spin_lock_irqsave(&phba->ct_ev_lock, flags); 1144 } 1145 } 1146 spin_unlock_irqrestore(&phba->ct_ev_lock, flags); 1147 1148error_ct_unsol_exit: 1149 if (!list_empty(&head)) --- 209 unchanged lines hidden (view full) --- 1359 kfree(evt_dat); 1360 } 1361 1362 spin_lock_irqsave(&phba->ct_ev_lock, flags); 1363 lpfc_bsg_event_unref(evt); 1364 spin_unlock_irqrestore(&phba->ct_ev_lock, flags); 1365 job->dd_data = NULL; 1366 bsg_reply->result = 0; | 1142 bsg_reply->reply_payload_rcv_len); 1143 spin_lock_irqsave(&phba->ct_ev_lock, flags); 1144 } 1145 } 1146 spin_unlock_irqrestore(&phba->ct_ev_lock, flags); 1147 1148error_ct_unsol_exit: 1149 if (!list_empty(&head)) --- 209 unchanged lines hidden (view full) --- 1359 kfree(evt_dat); 1360 } 1361 1362 spin_lock_irqsave(&phba->ct_ev_lock, flags); 1363 lpfc_bsg_event_unref(evt); 1364 spin_unlock_irqrestore(&phba->ct_ev_lock, flags); 1365 job->dd_data = NULL; 1366 bsg_reply->result = 0; |
1367 fc_bsg_jobdone(job, bsg_reply->result, | 1367 bsg_job_done(job, bsg_reply->result, |
1368 bsg_reply->reply_payload_rcv_len); 1369 return 0; 1370 1371job_error: 1372 job->dd_data = NULL; 1373 bsg_reply->result = rc; 1374 return rc; 1375} --- 81 unchanged lines hidden (view full) --- 1457 lpfc_sli_release_iocbq(phba, cmdiocbq); 1458 lpfc_nlp_put(ndlp); 1459 kfree(dd_data); 1460 1461 /* Complete the job if the job is still active */ 1462 1463 if (job) { 1464 bsg_reply->result = rc; | 1368 bsg_reply->reply_payload_rcv_len); 1369 return 0; 1370 1371job_error: 1372 job->dd_data = NULL; 1373 bsg_reply->result = rc; 1374 return rc; 1375} --- 81 unchanged lines hidden (view full) --- 1457 lpfc_sli_release_iocbq(phba, cmdiocbq); 1458 lpfc_nlp_put(ndlp); 1459 kfree(dd_data); 1460 1461 /* Complete the job if the job is still active */ 1462 1463 if (job) { 1464 bsg_reply->result = rc; |
1465 fc_bsg_jobdone(job, bsg_reply->result, | 1465 bsg_job_done(job, bsg_reply->result, |
1466 bsg_reply->reply_payload_rcv_len); 1467 } 1468 return; 1469} 1470 1471/** 1472 * lpfc_issue_ct_rsp - issue a ct response 1473 * @phba: Pointer to HBA context object. --- 412 unchanged lines hidden (view full) --- 1886 if (pmboxq && mbxstatus != MBX_TIMEOUT) 1887 mempool_free(pmboxq, phba->mbox_mem_pool); 1888 1889job_error: 1890 /* make error code available to userspace */ 1891 bsg_reply->result = rc; 1892 /* complete the job back to userspace if no error */ 1893 if (rc == 0) | 1466 bsg_reply->reply_payload_rcv_len); 1467 } 1468 return; 1469} 1470 1471/** 1472 * lpfc_issue_ct_rsp - issue a ct response 1473 * @phba: Pointer to HBA context object. --- 412 unchanged lines hidden (view full) --- 1886 if (pmboxq && mbxstatus != MBX_TIMEOUT) 1887 mempool_free(pmboxq, phba->mbox_mem_pool); 1888 1889job_error: 1890 /* make error code available to userspace */ 1891 bsg_reply->result = rc; 1892 /* complete the job back to userspace if no error */ 1893 if (rc == 0) |
1894 fc_bsg_jobdone(job, bsg_reply->result, | 1894 bsg_job_done(job, bsg_reply->result, |
1895 bsg_reply->reply_payload_rcv_len); 1896 return rc; 1897} 1898 1899/** 1900 * lpfc_sli4_bsg_set_link_diag_state - set sli4 link diag state 1901 * @phba: Pointer to HBA context object. 1902 * @diag: Flag for set link to diag or nomral operation state. --- 273 unchanged lines hidden (view full) --- 2176 } 2177 lpfc_bsg_diag_mode_exit(phba); 2178 2179job_error: 2180 /* make error code available to userspace */ 2181 bsg_reply->result = rc; 2182 /* complete the job back to userspace if no error */ 2183 if (rc == 0) | 1895 bsg_reply->reply_payload_rcv_len); 1896 return rc; 1897} 1898 1899/** 1900 * lpfc_sli4_bsg_set_link_diag_state - set sli4 link diag state 1901 * @phba: Pointer to HBA context object. 1902 * @diag: Flag for set link to diag or nomral operation state. --- 273 unchanged lines hidden (view full) --- 2176 } 2177 lpfc_bsg_diag_mode_exit(phba); 2178 2179job_error: 2180 /* make error code available to userspace */ 2181 bsg_reply->result = rc; 2182 /* complete the job back to userspace if no error */ 2183 if (rc == 0) |
2184 fc_bsg_jobdone(job, bsg_reply->result, | 2184 bsg_job_done(job, bsg_reply->result, |
2185 bsg_reply->reply_payload_rcv_len); 2186 return rc; 2187} 2188 2189/** 2190 * lpfc_bsg_diag_loopback_mode - bsg vendor command for diag loopback mode 2191 * @job: LPFC_BSG_VENDOR_DIAG_MODE 2192 * --- 98 unchanged lines hidden (view full) --- 2291 rc = lpfc_selective_reset(phba); 2292 phba->pport->fc_myDID = 0; 2293 2294loopback_mode_end_exit: 2295 /* make return code available to userspace */ 2296 bsg_reply->result = rc; 2297 /* complete the job back to userspace if no error */ 2298 if (rc == 0) | 2185 bsg_reply->reply_payload_rcv_len); 2186 return rc; 2187} 2188 2189/** 2190 * lpfc_bsg_diag_loopback_mode - bsg vendor command for diag loopback mode 2191 * @job: LPFC_BSG_VENDOR_DIAG_MODE 2192 * --- 98 unchanged lines hidden (view full) --- 2291 rc = lpfc_selective_reset(phba); 2292 phba->pport->fc_myDID = 0; 2293 2294loopback_mode_end_exit: 2295 /* make return code available to userspace */ 2296 bsg_reply->result = rc; 2297 /* complete the job back to userspace if no error */ 2298 if (rc == 0) |
2299 fc_bsg_jobdone(job, bsg_reply->result, | 2299 bsg_job_done(job, bsg_reply->result, |
2300 bsg_reply->reply_payload_rcv_len); 2301 return rc; 2302} 2303 2304/** 2305 * lpfc_sli4_bsg_link_diag_test - sli4 bsg vendor command for diag link test 2306 * @job: LPFC_BSG_VENDOR_DIAG_LINK_TEST 2307 * --- 136 unchanged lines hidden (view full) --- 2444 2445 lpfc_bsg_diag_mode_exit(phba); 2446 2447job_error: 2448 /* make error code available to userspace */ 2449 bsg_reply->result = rc; 2450 /* complete the job back to userspace if no error */ 2451 if (rc == 0) | 2300 bsg_reply->reply_payload_rcv_len); 2301 return rc; 2302} 2303 2304/** 2305 * lpfc_sli4_bsg_link_diag_test - sli4 bsg vendor command for diag link test 2306 * @job: LPFC_BSG_VENDOR_DIAG_LINK_TEST 2307 * --- 136 unchanged lines hidden (view full) --- 2444 2445 lpfc_bsg_diag_mode_exit(phba); 2446 2447job_error: 2448 /* make error code available to userspace */ 2449 bsg_reply->result = rc; 2450 /* complete the job back to userspace if no error */ 2451 if (rc == 0) |
2452 fc_bsg_jobdone(job, bsg_reply->result, | 2452 bsg_job_done(job, bsg_reply->result, |
2453 bsg_reply->reply_payload_rcv_len); 2454 return rc; 2455} 2456 2457/** 2458 * lpfcdiag_loop_self_reg - obtains a remote port login id 2459 * @phba: Pointer to HBA context object 2460 * @rpi: Pointer to a remote port login id --- 844 unchanged lines hidden (view full) --- 3305 3306loopback_test_exit: 3307 kfree(dataout); 3308 /* make error code available to userspace */ 3309 bsg_reply->result = rc; 3310 job->dd_data = NULL; 3311 /* complete the job back to userspace if no error */ 3312 if (rc == IOCB_SUCCESS) | 2453 bsg_reply->reply_payload_rcv_len); 2454 return rc; 2455} 2456 2457/** 2458 * lpfcdiag_loop_self_reg - obtains a remote port login id 2459 * @phba: Pointer to HBA context object 2460 * @rpi: Pointer to a remote port login id --- 844 unchanged lines hidden (view full) --- 3305 3306loopback_test_exit: 3307 kfree(dataout); 3308 /* make error code available to userspace */ 3309 bsg_reply->result = rc; 3310 job->dd_data = NULL; 3311 /* complete the job back to userspace if no error */ 3312 if (rc == IOCB_SUCCESS) |
3313 fc_bsg_jobdone(job, bsg_reply->result, | 3313 bsg_job_done(job, bsg_reply->result, |
3314 bsg_reply->reply_payload_rcv_len); 3315 return rc; 3316} 3317 3318/** 3319 * lpfc_bsg_get_dfc_rev - process a GET_DFC_REV bsg vendor command 3320 * @job: GET_DFC_REV fc_bsg_job 3321 **/ --- 27 unchanged lines hidden (view full) --- 3349 goto job_error; 3350 } 3351 3352 event_reply->info.a_Major = MANAGEMENT_MAJOR_REV; 3353 event_reply->info.a_Minor = MANAGEMENT_MINOR_REV; 3354job_error: 3355 bsg_reply->result = rc; 3356 if (rc == 0) | 3314 bsg_reply->reply_payload_rcv_len); 3315 return rc; 3316} 3317 3318/** 3319 * lpfc_bsg_get_dfc_rev - process a GET_DFC_REV bsg vendor command 3320 * @job: GET_DFC_REV fc_bsg_job 3321 **/ --- 27 unchanged lines hidden (view full) --- 3349 goto job_error; 3350 } 3351 3352 event_reply->info.a_Major = MANAGEMENT_MAJOR_REV; 3353 event_reply->info.a_Minor = MANAGEMENT_MINOR_REV; 3354job_error: 3355 bsg_reply->result = rc; 3356 if (rc == 0) |
3357 fc_bsg_jobdone(job, bsg_reply->result, | 3357 bsg_job_done(job, bsg_reply->result, |
3358 bsg_reply->reply_payload_rcv_len); 3359 return rc; 3360} 3361 3362/** 3363 * lpfc_bsg_issue_mbox_cmpl - lpfc_bsg_issue_mbox mbox completion handler 3364 * @phba: Pointer to HBA context object. 3365 * @pmboxq: Pointer to mailbox command. --- 49 unchanged lines hidden (view full) --- 3415 mempool_free(dd_data->context_un.mbox.pmboxq, phba->mbox_mem_pool); 3416 lpfc_bsg_dma_page_free(phba, dd_data->context_un.mbox.dmabuffers); 3417 kfree(dd_data); 3418 3419 /* Complete the job if the job is still active */ 3420 3421 if (job) { 3422 bsg_reply->result = 0; | 3358 bsg_reply->reply_payload_rcv_len); 3359 return rc; 3360} 3361 3362/** 3363 * lpfc_bsg_issue_mbox_cmpl - lpfc_bsg_issue_mbox mbox completion handler 3364 * @phba: Pointer to HBA context object. 3365 * @pmboxq: Pointer to mailbox command. --- 49 unchanged lines hidden (view full) --- 3415 mempool_free(dd_data->context_un.mbox.pmboxq, phba->mbox_mem_pool); 3416 lpfc_bsg_dma_page_free(phba, dd_data->context_un.mbox.dmabuffers); 3417 kfree(dd_data); 3418 3419 /* Complete the job if the job is still active */ 3420 3421 if (job) { 3422 bsg_reply->result = 0; |
3423 fc_bsg_jobdone(job, bsg_reply->result, | 3423 bsg_job_done(job, bsg_reply->result, |
3424 bsg_reply->reply_payload_rcv_len); 3425 } 3426 return; 3427} 3428 3429/** 3430 * lpfc_bsg_check_cmd_access - test for a supported mailbox command 3431 * @phba: Pointer to HBA context object. --- 232 unchanged lines hidden (view full) --- 3664 lpfc_bsg_mbox_ext_session_reset(phba); 3665 3666 /* free base driver mailbox structure memory */ 3667 mempool_free(pmboxq, phba->mbox_mem_pool); 3668 3669 /* if the job is still active, call job done */ 3670 if (job) { 3671 bsg_reply = job->reply; | 3424 bsg_reply->reply_payload_rcv_len); 3425 } 3426 return; 3427} 3428 3429/** 3430 * lpfc_bsg_check_cmd_access - test for a supported mailbox command 3431 * @phba: Pointer to HBA context object. --- 232 unchanged lines hidden (view full) --- 3664 lpfc_bsg_mbox_ext_session_reset(phba); 3665 3666 /* free base driver mailbox structure memory */ 3667 mempool_free(pmboxq, phba->mbox_mem_pool); 3668 3669 /* if the job is still active, call job done */ 3670 if (job) { 3671 bsg_reply = job->reply; |
3672 fc_bsg_jobdone(job, bsg_reply->result, | 3672 bsg_job_done(job, bsg_reply->result, |
3673 bsg_reply->reply_payload_rcv_len); 3674 } 3675 return; 3676} 3677 3678/** 3679 * lpfc_bsg_issue_write_mbox_ext_cmpl - cmpl handler for multi-buffer write mbox 3680 * @phba: Pointer to HBA context object. --- 21 unchanged lines hidden (view full) --- 3702 3703 /* free all memory, including dma buffers */ 3704 mempool_free(pmboxq, phba->mbox_mem_pool); 3705 lpfc_bsg_mbox_ext_session_reset(phba); 3706 3707 /* if the job is still active, call job done */ 3708 if (job) { 3709 bsg_reply = job->reply; | 3673 bsg_reply->reply_payload_rcv_len); 3674 } 3675 return; 3676} 3677 3678/** 3679 * lpfc_bsg_issue_write_mbox_ext_cmpl - cmpl handler for multi-buffer write mbox 3680 * @phba: Pointer to HBA context object. --- 21 unchanged lines hidden (view full) --- 3702 3703 /* free all memory, including dma buffers */ 3704 mempool_free(pmboxq, phba->mbox_mem_pool); 3705 lpfc_bsg_mbox_ext_session_reset(phba); 3706 3707 /* if the job is still active, call job done */ 3708 if (job) { 3709 bsg_reply = job->reply; |
3710 fc_bsg_jobdone(job, bsg_reply->result, | 3710 bsg_job_done(job, bsg_reply->result, |
3711 bsg_reply->reply_payload_rcv_len); 3712 } 3713 3714 return; 3715} 3716 3717static void 3718lpfc_bsg_sli_cfg_dma_desc_setup(struct lpfc_hba *phba, enum nemb_type nemb_tp, --- 426 unchanged lines hidden (view full) --- 4145 "maibox command, rc:x%x\n", rc); 4146 rc = -EPIPE; 4147 goto job_error; 4148 } 4149 4150 /* wait for additoinal external buffers */ 4151 4152 bsg_reply->result = 0; | 3711 bsg_reply->reply_payload_rcv_len); 3712 } 3713 3714 return; 3715} 3716 3717static void 3718lpfc_bsg_sli_cfg_dma_desc_setup(struct lpfc_hba *phba, enum nemb_type nemb_tp, --- 426 unchanged lines hidden (view full) --- 4145 "maibox command, rc:x%x\n", rc); 4146 rc = -EPIPE; 4147 goto job_error; 4148 } 4149 4150 /* wait for additoinal external buffers */ 4151 4152 bsg_reply->result = 0; |
4153 fc_bsg_jobdone(job, bsg_reply->result, | 4153 bsg_job_done(job, bsg_reply->result, |
4154 bsg_reply->reply_payload_rcv_len); 4155 return SLI_CONFIG_HANDLED; 4156 4157job_error: 4158 if (pmboxq) 4159 mempool_free(pmboxq, phba->mbox_mem_pool); 4160 kfree(dd_data); 4161 --- 210 unchanged lines hidden (view full) --- 4372 if (phba->mbox_ext_buf_ctx.seqNum == phba->mbox_ext_buf_ctx.numBuf) { 4373 lpfc_printf_log(phba, KERN_INFO, LOG_LIBDFC, 4374 "2965 SLI_CONFIG (hbd) ext-buffer rd mbox " 4375 "command session done\n"); 4376 lpfc_bsg_mbox_ext_session_reset(phba); 4377 } 4378 4379 bsg_reply->result = 0; | 4154 bsg_reply->reply_payload_rcv_len); 4155 return SLI_CONFIG_HANDLED; 4156 4157job_error: 4158 if (pmboxq) 4159 mempool_free(pmboxq, phba->mbox_mem_pool); 4160 kfree(dd_data); 4161 --- 210 unchanged lines hidden (view full) --- 4372 if (phba->mbox_ext_buf_ctx.seqNum == phba->mbox_ext_buf_ctx.numBuf) { 4373 lpfc_printf_log(phba, KERN_INFO, LOG_LIBDFC, 4374 "2965 SLI_CONFIG (hbd) ext-buffer rd mbox " 4375 "command session done\n"); 4376 lpfc_bsg_mbox_ext_session_reset(phba); 4377 } 4378 4379 bsg_reply->result = 0; |
4380 fc_bsg_jobdone(job, bsg_reply->result, | 4380 bsg_job_done(job, bsg_reply->result, |
4381 bsg_reply->reply_payload_rcv_len); 4382 4383 return SLI_CONFIG_HANDLED; 4384} 4385 4386/** 4387 * lpfc_bsg_write_ebuf_set - set the next mailbox write external buffer 4388 * @phba: Pointer to HBA context object. --- 100 unchanged lines hidden (view full) --- 4489 "2970 Failed to issue SLI_CONFIG ext-buffer " 4490 "maibox command, rc:x%x\n", rc); 4491 rc = -EPIPE; 4492 goto job_error; 4493 } 4494 4495 /* wait for additoinal external buffers */ 4496 bsg_reply->result = 0; | 4381 bsg_reply->reply_payload_rcv_len); 4382 4383 return SLI_CONFIG_HANDLED; 4384} 4385 4386/** 4387 * lpfc_bsg_write_ebuf_set - set the next mailbox write external buffer 4388 * @phba: Pointer to HBA context object. --- 100 unchanged lines hidden (view full) --- 4489 "2970 Failed to issue SLI_CONFIG ext-buffer " 4490 "maibox command, rc:x%x\n", rc); 4491 rc = -EPIPE; 4492 goto job_error; 4493 } 4494 4495 /* wait for additoinal external buffers */ 4496 bsg_reply->result = 0; |
4497 fc_bsg_jobdone(job, bsg_reply->result, | 4497 bsg_job_done(job, bsg_reply->result, |
4498 bsg_reply->reply_payload_rcv_len); 4499 return SLI_CONFIG_HANDLED; 4500 4501job_error: 4502 lpfc_bsg_dma_page_free(phba, dmabuf); 4503 kfree(dd_data); 4504 4505 return rc; --- 452 unchanged lines hidden (view full) --- 4958 } 4959 4960 rc = lpfc_bsg_issue_mbox(phba, job, vport); 4961 4962 if (rc == 0) { 4963 /* job done */ 4964 bsg_reply->result = 0; 4965 job->dd_data = NULL; | 4498 bsg_reply->reply_payload_rcv_len); 4499 return SLI_CONFIG_HANDLED; 4500 4501job_error: 4502 lpfc_bsg_dma_page_free(phba, dmabuf); 4503 kfree(dd_data); 4504 4505 return rc; --- 452 unchanged lines hidden (view full) --- 4958 } 4959 4960 rc = lpfc_bsg_issue_mbox(phba, job, vport); 4961 4962 if (rc == 0) { 4963 /* job done */ 4964 bsg_reply->result = 0; 4965 job->dd_data = NULL; |
4966 fc_bsg_jobdone(job, bsg_reply->result, | 4966 bsg_job_done(job, bsg_reply->result, |
4967 bsg_reply->reply_payload_rcv_len); 4968 } else if (rc == 1) 4969 /* job submitted, will complete later*/ 4970 rc = 0; /* return zero, no error */ 4971 else { 4972 /* some error occurred */ 4973 bsg_reply->result = rc; 4974 job->dd_data = NULL; --- 94 unchanged lines hidden (view full) --- 5069 lpfc_mbuf_free(phba, bmp->virt, bmp->phys); 5070 kfree(bmp); 5071 kfree(dd_data); 5072 5073 /* Complete the job if active */ 5074 5075 if (job) { 5076 bsg_reply->result = rc; | 4967 bsg_reply->reply_payload_rcv_len); 4968 } else if (rc == 1) 4969 /* job submitted, will complete later*/ 4970 rc = 0; /* return zero, no error */ 4971 else { 4972 /* some error occurred */ 4973 bsg_reply->result = rc; 4974 job->dd_data = NULL; --- 94 unchanged lines hidden (view full) --- 5069 lpfc_mbuf_free(phba, bmp->virt, bmp->phys); 5070 kfree(bmp); 5071 kfree(dd_data); 5072 5073 /* Complete the job if active */ 5074 5075 if (job) { 5076 bsg_reply->result = rc; |
5077 fc_bsg_jobdone(job, bsg_reply->result, | 5077 bsg_job_done(job, bsg_reply->result, |
5078 bsg_reply->reply_payload_rcv_len); 5079 } 5080 5081 return; 5082} 5083 5084/** 5085 * lpfc_menlo_cmd - send an ioctl for menlo hardware --- 202 unchanged lines hidden (view full) --- 5288 } 5289 5290 forced_reply->supported = (phba->hba_flag & HBA_FORCED_LINK_SPEED) 5291 ? LPFC_FORCED_LINK_SPEED_SUPPORTED 5292 : LPFC_FORCED_LINK_SPEED_NOT_SUPPORTED; 5293job_error: 5294 bsg_reply->result = rc; 5295 if (rc == 0) | 5078 bsg_reply->reply_payload_rcv_len); 5079 } 5080 5081 return; 5082} 5083 5084/** 5085 * lpfc_menlo_cmd - send an ioctl for menlo hardware --- 202 unchanged lines hidden (view full) --- 5288 } 5289 5290 forced_reply->supported = (phba->hba_flag & HBA_FORCED_LINK_SPEED) 5291 ? LPFC_FORCED_LINK_SPEED_SUPPORTED 5292 : LPFC_FORCED_LINK_SPEED_NOT_SUPPORTED; 5293job_error: 5294 bsg_reply->result = rc; 5295 if (rc == 0) |
5296 fc_bsg_jobdone(job, bsg_reply->result, | 5296 bsg_job_done(job, bsg_reply->result, |
5297 bsg_reply->reply_payload_rcv_len); 5298 return rc; 5299} 5300 5301/** 5302 * lpfc_bsg_hst_vendor - process a vendor-specific fc_bsg_job 5303 * @job: fc_bsg_job to handle 5304 **/ --- 206 unchanged lines hidden --- | 5297 bsg_reply->reply_payload_rcv_len); 5298 return rc; 5299} 5300 5301/** 5302 * lpfc_bsg_hst_vendor - process a vendor-specific fc_bsg_job 5303 * @job: fc_bsg_job to handle 5304 **/ --- 206 unchanged lines hidden --- |