scsi: libfc: Replace ->lport_recv with function call
The ->lport_recv callback only ever had one implementation, so call the function directly and remove the callback. Signed-off-by: Hannes Reinecke <hare@suse.com> Acked-by: Johannes Thumshirn <jth@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
31c0a631a4
commit
c5cb444c31
@@ -1527,7 +1527,7 @@ static void fc_exch_recv_req(struct fc_lport *lport, struct fc_exch_mgr *mp,
|
|||||||
* The upper-level protocol may request one later, if needed.
|
* The upper-level protocol may request one later, if needed.
|
||||||
*/
|
*/
|
||||||
if (fh->fh_rx_id == htons(FC_XID_UNKNOWN))
|
if (fh->fh_rx_id == htons(FC_XID_UNKNOWN))
|
||||||
return lport->tt.lport_recv(lport, fp);
|
return fc_lport_recv(lport, fp);
|
||||||
|
|
||||||
reject = fc_seq_lookup_recip(lport, mp, fp);
|
reject = fc_seq_lookup_recip(lport, mp, fp);
|
||||||
if (reject == FC_RJT_NONE) {
|
if (reject == FC_RJT_NONE) {
|
||||||
@@ -1548,7 +1548,7 @@ static void fc_exch_recv_req(struct fc_lport *lport, struct fc_exch_mgr *mp,
|
|||||||
* first.
|
* first.
|
||||||
*/
|
*/
|
||||||
if (!fc_invoke_resp(ep, sp, fp))
|
if (!fc_invoke_resp(ep, sp, fp))
|
||||||
lport->tt.lport_recv(lport, fp);
|
fc_lport_recv(lport, fp);
|
||||||
fc_exch_release(ep); /* release from lookup */
|
fc_exch_release(ep); /* release from lookup */
|
||||||
} else {
|
} else {
|
||||||
FC_LPORT_DBG(lport, "exch/seq lookup failed: reject %x\n",
|
FC_LPORT_DBG(lport, "exch/seq lookup failed: reject %x\n",
|
||||||
|
|||||||
@@ -944,15 +944,14 @@ struct fc4_prov fc_lport_els_prov = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fc_lport_recv_req() - The generic lport request handler
|
* fc_lport_recv() - The generic lport request handler
|
||||||
* @lport: The lport that received the request
|
* @lport: The lport that received the request
|
||||||
* @fp: The frame the request is in
|
* @fp: The frame the request is in
|
||||||
*
|
*
|
||||||
* Locking Note: This function should not be called with the lport
|
* Locking Note: This function should not be called with the lport
|
||||||
* lock held because it may grab the lock.
|
* lock held because it may grab the lock.
|
||||||
*/
|
*/
|
||||||
static void fc_lport_recv_req(struct fc_lport *lport,
|
void fc_lport_recv(struct fc_lport *lport, struct fc_frame *fp)
|
||||||
struct fc_frame *fp)
|
|
||||||
{
|
{
|
||||||
struct fc_frame_header *fh = fc_frame_header_get(fp);
|
struct fc_frame_header *fh = fc_frame_header_get(fp);
|
||||||
struct fc_seq *sp = fr_seq(fp);
|
struct fc_seq *sp = fr_seq(fp);
|
||||||
@@ -983,6 +982,7 @@ drop:
|
|||||||
if (sp)
|
if (sp)
|
||||||
lport->tt.exch_done(sp);
|
lport->tt.exch_done(sp);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(fc_lport_recv);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fc_lport_reset() - Reset a local port
|
* fc_lport_reset() - Reset a local port
|
||||||
@@ -1865,9 +1865,6 @@ EXPORT_SYMBOL(fc_lport_config);
|
|||||||
*/
|
*/
|
||||||
int fc_lport_init(struct fc_lport *lport)
|
int fc_lport_init(struct fc_lport *lport)
|
||||||
{
|
{
|
||||||
if (!lport->tt.lport_recv)
|
|
||||||
lport->tt.lport_recv = fc_lport_recv_req;
|
|
||||||
|
|
||||||
fc_host_port_type(lport->host) = FC_PORTTYPE_NPORT;
|
fc_host_port_type(lport->host) = FC_PORTTYPE_NPORT;
|
||||||
fc_host_node_name(lport->host) = lport->wwnn;
|
fc_host_node_name(lport->host) = lport->wwnn;
|
||||||
fc_host_port_name(lport->host) = lport->wwpn;
|
fc_host_port_name(lport->host) = lport->wwpn;
|
||||||
|
|||||||
@@ -620,13 +620,6 @@ struct libfc_function_template {
|
|||||||
*/
|
*/
|
||||||
void (*rport_flush_queue)(void);
|
void (*rport_flush_queue)(void);
|
||||||
|
|
||||||
/*
|
|
||||||
* Receive a frame for a local port.
|
|
||||||
*
|
|
||||||
* STATUS: OPTIONAL
|
|
||||||
*/
|
|
||||||
void (*lport_recv)(struct fc_lport *, struct fc_frame *);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the local port FC_ID.
|
* Set the local port FC_ID.
|
||||||
*
|
*
|
||||||
@@ -1060,6 +1053,7 @@ void fc_vport_setlink(struct fc_lport *);
|
|||||||
void fc_vports_linkchange(struct fc_lport *);
|
void fc_vports_linkchange(struct fc_lport *);
|
||||||
int fc_lport_config(struct fc_lport *);
|
int fc_lport_config(struct fc_lport *);
|
||||||
int fc_lport_reset(struct fc_lport *);
|
int fc_lport_reset(struct fc_lport *);
|
||||||
|
void fc_lport_recv(struct fc_lport *lport, struct fc_frame *fp);
|
||||||
int fc_set_mfs(struct fc_lport *, u32 mfs);
|
int fc_set_mfs(struct fc_lport *, u32 mfs);
|
||||||
struct fc_lport *libfc_vport_create(struct fc_vport *, int privsize);
|
struct fc_lport *libfc_vport_create(struct fc_vport *, int privsize);
|
||||||
struct fc_lport *fc_vport_id_lookup(struct fc_lport *, u32 port_id);
|
struct fc_lport *fc_vport_id_lookup(struct fc_lport *, u32 port_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user