diff --git a/qla2x00t/qla_bsg.c b/qla2x00t/qla_bsg.c index 587374b1b..5d90c8b63 100644 --- a/qla2x00t/qla_bsg.c +++ b/qla2x00t/qla_bsg.c @@ -2196,7 +2196,11 @@ qla24xx_bsg_timeout(struct bsg_job *bsg_job) ql_log(ql_log_warn, vha, 0x7089, "mbx abort_command " "failed.\n"); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) + scsi_req(bsg_job->req)->result = +#else bsg_job->req->errors = +#endif #ifndef NEW_LIBFC_API bsg_job->reply->result = -EIO; #else @@ -2206,7 +2210,11 @@ qla24xx_bsg_timeout(struct bsg_job *bsg_job) ql_dbg(ql_dbg_user, vha, 0x708a, "mbx abort_command " "success.\n"); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) + scsi_req(bsg_job->req)->result = +#else bsg_job->req->errors = +#endif #ifndef NEW_LIBFC_API bsg_job->reply->result = 0; #else @@ -2224,7 +2232,12 @@ qla24xx_bsg_timeout(struct bsg_job *bsg_job) #ifndef NEW_LIBFC_API bsg_job->req->errors = bsg_job->reply->result = -ENXIO; #else - bsg_job->req->errors = bsg_reply->result = -ENXIO; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) + scsi_req(bsg_job->req)->result = +#else + bsg_job->req->errors = +#endif + bsg_reply->result = -ENXIO; #endif return 0; diff --git a/qla2x00t/qla_isr.c b/qla2x00t/qla_isr.c index 880647c61..32be7c717 100644 --- a/qla2x00t/qla_isr.c +++ b/qla2x00t/qla_isr.c @@ -2705,6 +2705,7 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp) for (i = 0; i < ha->msix_count; i++) entries[i].entry = i; +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) ret = pci_enable_msix(ha->pdev, entries, ha->msix_count); if (ret) { if (ret < MIN_MSIX_COUNT) @@ -2726,6 +2727,24 @@ msix_failed: } ha->max_rsp_queues = ha->msix_count - 1; } +#else + ret = pci_enable_msix_range(ha->pdev, + entries, MIN_MSIX_COUNT, ha->msix_count); + if (ret < 0) { + ql_log(ql_log_fatal, vha, 0x00c7, + "MSI-X: Failed to enable support, " + "giving up -- %d/%d.\n", + ha->msix_count, ret); + goto msix_out; + } else if (ret < ha->msix_count) { + ql_log(ql_log_warn, vha, 0x00c6, + "MSI-X: Failed to enable support " + "with %d vectors, using %d vectors.\n", + ha->msix_count, ret); + ha->msix_count = ret; + ha->max_rsp_queues = ha->msix_count - 1; + } +#endif ha->msix_entries = kcalloc(ha->msix_count, sizeof(struct qla_msix_entry), GFP_KERNEL); if (!ha->msix_entries) {