Skip to content

Commit 372dcc0

Browse files
Dr. David Alan Gilbertmartinkpetersen
authored andcommitted
scsi: bfa: Remove unused bfa_fcs code
These functions aren't called anywhere, remove them. Build tested only. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://lore.kernel.org/r/20240915125633.25036-5-linux@treblig.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent b744480 commit 372dcc0

4 files changed

Lines changed: 0 additions & 212 deletions

File tree

drivers/scsi/bfa/bfa_defs_fcs.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -124,28 +124,6 @@ enum bfa_lport_offline_reason {
124124
BFA_LPORT_OFFLINE_FAB_LOGOUT,
125125
};
126126

127-
/*
128-
* FCS lport info.
129-
*/
130-
struct bfa_lport_info_s {
131-
u8 port_type; /* bfa_lport_type_t : physical or
132-
* virtual */
133-
u8 port_state; /* one of bfa_lport_state values */
134-
u8 offline_reason; /* one of bfa_lport_offline_reason_t
135-
* values */
136-
wwn_t port_wwn;
137-
wwn_t node_wwn;
138-
139-
/*
140-
* following 4 feilds are valid for Physical Ports only
141-
*/
142-
u32 max_vports_supp; /* Max supported vports */
143-
u32 num_vports_inuse; /* Num of in use vports */
144-
u32 max_rports_supp; /* Max supported rports */
145-
u32 num_rports_inuse; /* Num of doscovered rports */
146-
147-
};
148-
149127
/*
150128
* FCS port statistics
151129
*/

drivers/scsi/bfa/bfa_fcs.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -373,15 +373,11 @@ bfa_boolean_t bfa_fcs_lport_is_online(struct bfa_fcs_lport_s *port);
373373
struct bfa_fcs_lport_s *bfa_fcs_get_base_port(struct bfa_fcs_s *fcs);
374374
void bfa_fcs_lport_get_rport_quals(struct bfa_fcs_lport_s *port,
375375
struct bfa_rport_qualifier_s rport[], int *nrports);
376-
wwn_t bfa_fcs_lport_get_rport(struct bfa_fcs_lport_s *port, wwn_t wwn,
377-
int index, int nrports, bfa_boolean_t bwwn);
378376

379377
struct bfa_fcs_lport_s *bfa_fcs_lookup_port(struct bfa_fcs_s *fcs,
380378
u16 vf_id, wwn_t lpwwn);
381379

382380
void bfa_fcs_lport_set_symname(struct bfa_fcs_lport_s *port, char *symname);
383-
void bfa_fcs_lport_get_info(struct bfa_fcs_lport_s *port,
384-
struct bfa_lport_info_s *port_info);
385381
void bfa_fcs_lport_get_attr(struct bfa_fcs_lport_s *port,
386382
struct bfa_lport_attr_s *port_attr);
387383
void bfa_fcs_lport_get_stats(struct bfa_fcs_lport_s *fcs_port,
@@ -416,8 +412,6 @@ struct bfa_fcs_rport_s *bfa_fcs_lport_get_rport_by_old_pid(
416412
struct bfa_fcs_lport_s *port, u32 pid);
417413
struct bfa_fcs_rport_s *bfa_fcs_lport_get_rport_by_pwwn(
418414
struct bfa_fcs_lport_s *port, wwn_t pwwn);
419-
struct bfa_fcs_rport_s *bfa_fcs_lport_get_rport_by_nwwn(
420-
struct bfa_fcs_lport_s *port, wwn_t nwwn);
421415
struct bfa_fcs_rport_s *bfa_fcs_lport_get_rport_by_qualifier(
422416
struct bfa_fcs_lport_s *port, wwn_t pwwn, u32 pid);
423417
void bfa_fcs_lport_add_rport(struct bfa_fcs_lport_s *port,
@@ -486,15 +480,13 @@ bfa_status_t bfa_fcs_pbc_vport_create(struct bfa_fcs_vport_s *vport,
486480
struct bfa_fcs_s *fcs, u16 vf_id,
487481
struct bfa_lport_cfg_s *port_cfg,
488482
struct bfad_vport_s *vport_drv);
489-
bfa_boolean_t bfa_fcs_is_pbc_vport(struct bfa_fcs_vport_s *vport);
490483
bfa_status_t bfa_fcs_vport_delete(struct bfa_fcs_vport_s *vport);
491484
bfa_status_t bfa_fcs_vport_start(struct bfa_fcs_vport_s *vport);
492485
bfa_status_t bfa_fcs_vport_stop(struct bfa_fcs_vport_s *vport);
493486
void bfa_fcs_vport_get_attr(struct bfa_fcs_vport_s *vport,
494487
struct bfa_vport_attr_s *vport_attr);
495488
struct bfa_fcs_vport_s *bfa_fcs_vport_lookup(struct bfa_fcs_s *fcs,
496489
u16 vf_id, wwn_t vpwwn);
497-
void bfa_fcs_vport_cleanup(struct bfa_fcs_vport_s *vport);
498490
void bfa_fcs_vport_online(struct bfa_fcs_vport_s *vport);
499491
void bfa_fcs_vport_offline(struct bfa_fcs_vport_s *vport);
500492
void bfa_fcs_vport_delete_comp(struct bfa_fcs_vport_s *vport);
@@ -623,8 +615,6 @@ void bfa_fcs_rport_get_attr(struct bfa_fcs_rport_s *rport,
623615
struct bfa_rport_attr_s *attr);
624616
struct bfa_fcs_rport_s *bfa_fcs_rport_lookup(struct bfa_fcs_lport_s *port,
625617
wwn_t rpwwn);
626-
struct bfa_fcs_rport_s *bfa_fcs_rport_lookup_by_nwwn(
627-
struct bfa_fcs_lport_s *port, wwn_t rnwwn);
628618
void bfa_fcs_rport_set_del_timeout(u8 rport_tmo);
629619
void bfa_fcs_rport_set_max_logins(u32 max_logins);
630620
void bfa_fcs_rport_uf_recv(struct bfa_fcs_rport_s *rport,
@@ -633,8 +623,6 @@ void bfa_fcs_rport_scn(struct bfa_fcs_rport_s *rport);
633623

634624
struct bfa_fcs_rport_s *bfa_fcs_rport_create(struct bfa_fcs_lport_s *port,
635625
u32 pid);
636-
void bfa_fcs_rport_start(struct bfa_fcs_lport_s *port, struct fchs_s *rx_fchs,
637-
struct fc_logi_s *plogi_rsp);
638626
void bfa_fcs_rport_plogi_create(struct bfa_fcs_lport_s *port,
639627
struct fchs_s *rx_fchs,
640628
struct fc_logi_s *plogi);

drivers/scsi/bfa/bfa_fcs_lport.c

Lines changed: 0 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -937,25 +937,6 @@ bfa_fcs_lport_get_rport_by_pwwn(struct bfa_fcs_lport_s *port, wwn_t pwwn)
937937
return NULL;
938938
}
939939

940-
/*
941-
* NWWN based Lookup for a R-Port in the Port R-Port Queue
942-
*/
943-
struct bfa_fcs_rport_s *
944-
bfa_fcs_lport_get_rport_by_nwwn(struct bfa_fcs_lport_s *port, wwn_t nwwn)
945-
{
946-
struct bfa_fcs_rport_s *rport;
947-
struct list_head *qe;
948-
949-
list_for_each(qe, &port->rport_q) {
950-
rport = (struct bfa_fcs_rport_s *) qe;
951-
if (wwn_is_equal(rport->nwwn, nwwn))
952-
return rport;
953-
}
954-
955-
bfa_trc(port->fcs, nwwn);
956-
return NULL;
957-
}
958-
959940
/*
960941
* PWWN & PID based Lookup for a R-Port in the Port R-Port Queue
961942
*/
@@ -5645,54 +5626,6 @@ bfa_fcs_get_base_port(struct bfa_fcs_s *fcs)
56455626
return &fcs->fabric.bport;
56465627
}
56475628

5648-
wwn_t
5649-
bfa_fcs_lport_get_rport(struct bfa_fcs_lport_s *port, wwn_t wwn, int index,
5650-
int nrports, bfa_boolean_t bwwn)
5651-
{
5652-
struct list_head *qh, *qe;
5653-
struct bfa_fcs_rport_s *rport = NULL;
5654-
int i;
5655-
struct bfa_fcs_s *fcs;
5656-
5657-
if (port == NULL || nrports == 0)
5658-
return (wwn_t) 0;
5659-
5660-
fcs = port->fcs;
5661-
bfa_trc(fcs, (u32) nrports);
5662-
5663-
i = 0;
5664-
qh = &port->rport_q;
5665-
qe = bfa_q_first(qh);
5666-
5667-
while ((qe != qh) && (i < nrports)) {
5668-
rport = (struct bfa_fcs_rport_s *) qe;
5669-
if (bfa_ntoh3b(rport->pid) > 0xFFF000) {
5670-
qe = bfa_q_next(qe);
5671-
bfa_trc(fcs, (u32) rport->pwwn);
5672-
bfa_trc(fcs, rport->pid);
5673-
bfa_trc(fcs, i);
5674-
continue;
5675-
}
5676-
5677-
if (bwwn) {
5678-
if (!memcmp(&wwn, &rport->pwwn, 8))
5679-
break;
5680-
} else {
5681-
if (i == index)
5682-
break;
5683-
}
5684-
5685-
i++;
5686-
qe = bfa_q_next(qe);
5687-
}
5688-
5689-
bfa_trc(fcs, i);
5690-
if (rport)
5691-
return rport->pwwn;
5692-
else
5693-
return (wwn_t) 0;
5694-
}
5695-
56965629
void
56975630
bfa_fcs_lport_get_rport_quals(struct bfa_fcs_lport_s *port,
56985631
struct bfa_rport_qualifier_s rports[], int *nrports)
@@ -5823,54 +5756,6 @@ bfa_fcs_lookup_port(struct bfa_fcs_s *fcs, u16 vf_id, wwn_t lpwwn)
58235756
return NULL;
58245757
}
58255758

5826-
/*
5827-
* API corresponding to NPIV_VPORT_GETINFO.
5828-
*/
5829-
void
5830-
bfa_fcs_lport_get_info(struct bfa_fcs_lport_s *port,
5831-
struct bfa_lport_info_s *port_info)
5832-
{
5833-
5834-
bfa_trc(port->fcs, port->fabric->fabric_name);
5835-
5836-
if (port->vport == NULL) {
5837-
/*
5838-
* This is a Physical port
5839-
*/
5840-
port_info->port_type = BFA_LPORT_TYPE_PHYSICAL;
5841-
5842-
/*
5843-
* @todo : need to fix the state & reason
5844-
*/
5845-
port_info->port_state = 0;
5846-
port_info->offline_reason = 0;
5847-
5848-
port_info->port_wwn = bfa_fcs_lport_get_pwwn(port);
5849-
port_info->node_wwn = bfa_fcs_lport_get_nwwn(port);
5850-
5851-
port_info->max_vports_supp =
5852-
bfa_lps_get_max_vport(port->fcs->bfa);
5853-
port_info->num_vports_inuse =
5854-
port->fabric->num_vports;
5855-
port_info->max_rports_supp = BFA_FCS_MAX_RPORTS_SUPP;
5856-
port_info->num_rports_inuse = port->num_rports;
5857-
} else {
5858-
/*
5859-
* This is a virtual port
5860-
*/
5861-
port_info->port_type = BFA_LPORT_TYPE_VIRTUAL;
5862-
5863-
/*
5864-
* @todo : need to fix the state & reason
5865-
*/
5866-
port_info->port_state = 0;
5867-
port_info->offline_reason = 0;
5868-
5869-
port_info->port_wwn = bfa_fcs_lport_get_pwwn(port);
5870-
port_info->node_wwn = bfa_fcs_lport_get_nwwn(port);
5871-
}
5872-
}
5873-
58745759
void
58755760
bfa_fcs_lport_get_stats(struct bfa_fcs_lport_s *fcs_port,
58765761
struct bfa_lport_stats_s *port_stats)
@@ -6567,15 +6452,6 @@ bfa_fcs_vport_offline(struct bfa_fcs_vport_s *vport)
65676452
bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_OFFLINE);
65686453
}
65696454

6570-
/*
6571-
* Cleanup notification from fabric SM on link timer expiry.
6572-
*/
6573-
void
6574-
bfa_fcs_vport_cleanup(struct bfa_fcs_vport_s *vport)
6575-
{
6576-
vport->vport_stats.fab_cleanup++;
6577-
}
6578-
65796455
/*
65806456
* Stop notification from fabric SM. To be invoked from within FCS.
65816457
*/
@@ -6698,24 +6574,6 @@ bfa_fcs_pbc_vport_create(struct bfa_fcs_vport_s *vport, struct bfa_fcs_s *fcs,
66986574
return rc;
66996575
}
67006576

6701-
/*
6702-
* Use this function to findout if this is a pbc vport or not.
6703-
*
6704-
* @param[in] vport - pointer to bfa_fcs_vport_t.
6705-
*
6706-
* @returns None
6707-
*/
6708-
bfa_boolean_t
6709-
bfa_fcs_is_pbc_vport(struct bfa_fcs_vport_s *vport)
6710-
{
6711-
6712-
if (vport && (vport->lport.port_cfg.preboot_vp == BFA_TRUE))
6713-
return BFA_TRUE;
6714-
else
6715-
return BFA_FALSE;
6716-
6717-
}
6718-
67196577
/*
67206578
* Use this function initialize the vport.
67216579
*

drivers/scsi/bfa/bfa_fcs_rport.c

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2646,27 +2646,6 @@ bfa_fcs_rport_create_by_wwn(struct bfa_fcs_lport_s *port, wwn_t rpwwn)
26462646
bfa_sm_send_event(rport, RPSM_EVENT_ADDRESS_DISC);
26472647
return rport;
26482648
}
2649-
/*
2650-
* Called by bport in private loop topology to indicate that a
2651-
* rport has been discovered and plogi has been completed.
2652-
*
2653-
* @param[in] port - base port or vport
2654-
* @param[in] rpid - remote port ID
2655-
*/
2656-
void
2657-
bfa_fcs_rport_start(struct bfa_fcs_lport_s *port, struct fchs_s *fchs,
2658-
struct fc_logi_s *plogi)
2659-
{
2660-
struct bfa_fcs_rport_s *rport;
2661-
2662-
rport = bfa_fcs_rport_alloc(port, WWN_NULL, fchs->s_id);
2663-
if (!rport)
2664-
return;
2665-
2666-
bfa_fcs_rport_update(rport, plogi);
2667-
2668-
bfa_sm_send_event(rport, RPSM_EVENT_PLOGI_COMP);
2669-
}
26702649

26712650
/*
26722651
* Called by bport/vport to handle PLOGI received from a new remote port.
@@ -3089,21 +3068,6 @@ bfa_fcs_rport_lookup(struct bfa_fcs_lport_s *port, wwn_t rpwwn)
30893068
return rport;
30903069
}
30913070

3092-
struct bfa_fcs_rport_s *
3093-
bfa_fcs_rport_lookup_by_nwwn(struct bfa_fcs_lport_s *port, wwn_t rnwwn)
3094-
{
3095-
struct bfa_fcs_rport_s *rport;
3096-
3097-
rport = bfa_fcs_lport_get_rport_by_nwwn(port, rnwwn);
3098-
if (rport == NULL) {
3099-
/*
3100-
* TBD Error handling
3101-
*/
3102-
}
3103-
3104-
return rport;
3105-
}
3106-
31073071
/*
31083072
* Remote port features (RPF) implementation.
31093073
*/

0 commit comments

Comments
 (0)