From 0e2c596c028fd1cf8b075cd2cceae8580db8d679 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 28 Mar 2021 14:45:06 +0000 Subject: [PATCH] qla2x00t-32gbit: Fix the CentOS 7.8 build Signed-off-by: Chesnokov Gleb [ bvanassche: modified qla_nvme changes ] git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9371 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t-32gbit/qla_bsg.c | 20 ++++++++++++++++++++ qla2x00t-32gbit/qla_nvme.c | 16 ++++++++-------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/qla2x00t-32gbit/qla_bsg.c b/qla2x00t-32gbit/qla_bsg.c index c8dd561a6..9cc1c5a85 100644 --- a/qla2x00t-32gbit/qla_bsg.c +++ b/qla2x00t-32gbit/qla_bsg.c @@ -2605,8 +2605,13 @@ qla2x00_get_flash_image_status(struct bsg_job *bsg_job) return 0; } +#ifndef NEW_LIBFC_API +static int +qla2x00_manage_host_stats(struct fc_bsg_job *bsg_job) +#else static int qla2x00_manage_host_stats(struct bsg_job *bsg_job) +#endif { scsi_qla_host_t *vha = shost_priv(fc_bsg_to_shost(bsg_job)); struct fc_bsg_reply *bsg_reply = bsg_job->reply; @@ -2674,8 +2679,13 @@ qla2x00_manage_host_stats(struct bsg_job *bsg_job) return ret; } +#ifndef NEW_LIBFC_API +static int +qla2x00_get_host_stats(struct fc_bsg_job *bsg_job) +#else static int qla2x00_get_host_stats(struct bsg_job *bsg_job) +#endif { scsi_qla_host_t *vha = shost_priv(fc_bsg_to_shost(bsg_job)); struct fc_bsg_reply *bsg_reply = bsg_job->reply; @@ -2775,8 +2785,13 @@ qla2xxx_find_rport(scsi_qla_host_t *vha, uint32_t tgt_num) return NULL; } +#ifndef NEW_LIBFC_API +static int +qla2x00_get_tgt_stats(struct fc_bsg_job *bsg_job) +#else static int qla2x00_get_tgt_stats(struct bsg_job *bsg_job) +#endif { scsi_qla_host_t *vha = shost_priv(fc_bsg_to_shost(bsg_job)); struct fc_bsg_reply *bsg_reply = bsg_job->reply; @@ -2864,8 +2879,13 @@ tgt_stat_out: return ret; } +#ifndef NEW_LIBFC_API +static int +qla2x00_manage_host_port(struct fc_bsg_job *bsg_job) +#else static int qla2x00_manage_host_port(struct bsg_job *bsg_job) +#endif { scsi_qla_host_t *vha = shost_priv(fc_bsg_to_shost(bsg_job)); struct fc_bsg_reply *bsg_reply = bsg_job->reply; diff --git a/qla2x00t-32gbit/qla_nvme.c b/qla2x00t-32gbit/qla_nvme.c index 4da6a9e8a..f6f8e6738 100644 --- a/qla2x00t-32gbit/qla_nvme.c +++ b/qla2x00t-32gbit/qla_nvme.c @@ -766,6 +766,14 @@ int qla_nvme_register_hba(struct scsi_qla_host *vha) return ret; } +#else + +void qla_nvme_unregister_remote_port(struct fc_port *fcport) +{ +} + +#endif + void qla_nvme_abort_set_option(struct abort_entry_24xx *abt, srb_t *orig_sp) { struct qla_hw_data *ha; @@ -847,11 +855,3 @@ inline void qla_wait_nvme_release_cmd_kref(srb_t *orig_sp) return; kref_put(&orig_sp->cmd_kref, orig_sp->put_fn); } - -#else - -void qla_nvme_unregister_remote_port(struct fc_port *fcport) -{ -} - -#endif