Skip to content

Commit

Permalink
scsi: qla2xxx: Move function prototype to correct header
Browse files Browse the repository at this point in the history
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
himanshu.madhani@cavium.com authored and Martin K. Petersen committed Aug 7, 2017
1 parent 6fcd98f commit 0f7e51f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 18 deletions.
11 changes: 0 additions & 11 deletions drivers/scsi/qla2xxx/qla_gbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@

#include <linux/interrupt.h>

/*
* Global functions prototype in qla_nvme.c source file.
*/
extern void qla_nvme_register_hba(scsi_qla_host_t *);
extern int qla_nvme_register_remote(scsi_qla_host_t *, fc_port_t *);
extern void qla_nvme_delete(scsi_qla_host_t *);
extern void qla_nvme_abort(struct qla_hw_data *, srb_t *sp);
extern void qla24xx_nvme_ls4_iocb(scsi_qla_host_t *, struct pt_ls4_request *,
struct req_que *);
extern void qla24xx_async_gffid_sp_done(void *, int);

/*
* Global Function Prototypes in qla_init.c source file.
*/
Expand Down
4 changes: 2 additions & 2 deletions drivers/scsi/qla2xxx/qla_isr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2827,8 +2827,8 @@ qla24xx_abort_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
sp->done(sp, 0);
}

void qla24xx_nvme_ls4_iocb(scsi_qla_host_t *vha, struct pt_ls4_request *pkt,
struct req_que *req)
void qla24xx_nvme_ls4_iocb(struct scsi_qla_host *vha,
struct pt_ls4_request *pkt, struct req_que *req)
{
srb_t *sp;
const char func[] = "LS4_IOCB";
Expand Down
9 changes: 4 additions & 5 deletions drivers/scsi/qla2xxx/qla_nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* See LICENSE.qla2xxx for copyright and licensing details.
*/
#include "qla_nvme.h"
#include "qla_def.h"
#include <linux/scatterlist.h>
#include <linux/delay.h>
#include <linux/nvme.h>
Expand All @@ -15,7 +14,7 @@ static struct nvme_fc_port_template qla_nvme_fc_transport;

static void qla_nvme_unregister_remote_port(struct work_struct *);

int qla_nvme_register_remote(scsi_qla_host_t *vha, fc_port_t *fcport)
int qla_nvme_register_remote(struct scsi_qla_host *vha, struct fc_port *fcport)
{
struct nvme_rport *rport;
int ret;
Expand Down Expand Up @@ -616,7 +615,7 @@ static int qla_nvme_wait_on_rport_del(fc_port_t *fcport)
return ret;
}

void qla_nvme_abort(struct qla_hw_data *ha, srb_t *sp)
void qla_nvme_abort(struct qla_hw_data *ha, struct srb *sp)
{
int rval;

Expand Down Expand Up @@ -679,7 +678,7 @@ static void qla_nvme_unregister_remote_port(struct work_struct *work)
}
}

void qla_nvme_delete(scsi_qla_host_t *vha)
void qla_nvme_delete(struct scsi_qla_host *vha)
{
struct nvme_rport *rport, *trport;
fc_port_t *fcport;
Expand Down Expand Up @@ -711,7 +710,7 @@ void qla_nvme_delete(scsi_qla_host_t *vha)
}
}

void qla_nvme_register_hba(scsi_qla_host_t *vha)
void qla_nvme_register_hba(struct scsi_qla_host *vha)
{
struct nvme_fc_port_template *tmpl;
struct qla_hw_data *ha;
Expand Down
17 changes: 17 additions & 0 deletions drivers/scsi/qla2xxx/qla_nvme.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,18 @@
#include <uapi/scsi/fc/fc_els.h>
#include <linux/nvme-fc-driver.h>

#include "qla_def.h"

#define NVME_ATIO_CMD_OFF 32
#define NVME_FIRST_PACKET_CMDLEN (64 - NVME_ATIO_CMD_OFF)
#define Q2T_NVME_NUM_TAGS 2048
#define QLA_MAX_FC_SEGMENTS 64

struct scsi_qla_host;
struct qla_hw_data;
struct req_que;
struct srb;

struct nvme_private {
struct srb *sp;
struct nvmefc_ls_req *fd;
Expand Down Expand Up @@ -129,4 +135,15 @@ struct pt_ls4_rx_unsol {
uint32_t desc_len;
uint32_t payload[3];
};

/*
* Global functions prototype in qla_nvme.c source file.
*/
void qla_nvme_register_hba(struct scsi_qla_host *);
int qla_nvme_register_remote(struct scsi_qla_host *, struct fc_port *);
void qla_nvme_delete(struct scsi_qla_host *);
void qla_nvme_abort(struct qla_hw_data *, struct srb *sp);
void qla24xx_nvme_ls4_iocb(struct scsi_qla_host *, struct pt_ls4_request *,
struct req_que *);
void qla24xx_async_gffid_sp_done(void *, int);
#endif

0 comments on commit 0f7e51f

Please sign in to comment.