Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dr. David Alan Gilbert and committed by
Martin K. Petersen
372dcc01 b7444800

-212
-22
drivers/scsi/bfa/bfa_defs_fcs.h
··· 125 125 }; 126 126 127 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 - 149 - /* 150 128 * FCS port statistics 151 129 */ 152 130 struct bfa_lport_stats_s {
-12
drivers/scsi/bfa/bfa_fcs.h
··· 373 373 struct bfa_fcs_lport_s *bfa_fcs_get_base_port(struct bfa_fcs_s *fcs); 374 374 void bfa_fcs_lport_get_rport_quals(struct bfa_fcs_lport_s *port, 375 375 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); 378 376 379 377 struct bfa_fcs_lport_s *bfa_fcs_lookup_port(struct bfa_fcs_s *fcs, 380 378 u16 vf_id, wwn_t lpwwn); 381 379 382 380 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); 385 381 void bfa_fcs_lport_get_attr(struct bfa_fcs_lport_s *port, 386 382 struct bfa_lport_attr_s *port_attr); 387 383 void bfa_fcs_lport_get_stats(struct bfa_fcs_lport_s *fcs_port, ··· 412 416 struct bfa_fcs_lport_s *port, u32 pid); 413 417 struct bfa_fcs_rport_s *bfa_fcs_lport_get_rport_by_pwwn( 414 418 struct bfa_fcs_lport_s *port, wwn_t pwwn); 415 - struct bfa_fcs_rport_s *bfa_fcs_lport_get_rport_by_nwwn( 416 - struct bfa_fcs_lport_s *port, wwn_t nwwn); 417 419 struct bfa_fcs_rport_s *bfa_fcs_lport_get_rport_by_qualifier( 418 420 struct bfa_fcs_lport_s *port, wwn_t pwwn, u32 pid); 419 421 void bfa_fcs_lport_add_rport(struct bfa_fcs_lport_s *port, ··· 480 486 struct bfa_fcs_s *fcs, u16 vf_id, 481 487 struct bfa_lport_cfg_s *port_cfg, 482 488 struct bfad_vport_s *vport_drv); 483 - bfa_boolean_t bfa_fcs_is_pbc_vport(struct bfa_fcs_vport_s *vport); 484 489 bfa_status_t bfa_fcs_vport_delete(struct bfa_fcs_vport_s *vport); 485 490 bfa_status_t bfa_fcs_vport_start(struct bfa_fcs_vport_s *vport); 486 491 bfa_status_t bfa_fcs_vport_stop(struct bfa_fcs_vport_s *vport); ··· 487 494 struct bfa_vport_attr_s *vport_attr); 488 495 struct bfa_fcs_vport_s *bfa_fcs_vport_lookup(struct bfa_fcs_s *fcs, 489 496 u16 vf_id, wwn_t vpwwn); 490 - void bfa_fcs_vport_cleanup(struct bfa_fcs_vport_s *vport); 491 497 void bfa_fcs_vport_online(struct bfa_fcs_vport_s *vport); 492 498 void bfa_fcs_vport_offline(struct bfa_fcs_vport_s *vport); 493 499 void bfa_fcs_vport_delete_comp(struct bfa_fcs_vport_s *vport); ··· 615 623 struct bfa_rport_attr_s *attr); 616 624 struct bfa_fcs_rport_s *bfa_fcs_rport_lookup(struct bfa_fcs_lport_s *port, 617 625 wwn_t rpwwn); 618 - struct bfa_fcs_rport_s *bfa_fcs_rport_lookup_by_nwwn( 619 - struct bfa_fcs_lport_s *port, wwn_t rnwwn); 620 626 void bfa_fcs_rport_set_del_timeout(u8 rport_tmo); 621 627 void bfa_fcs_rport_set_max_logins(u32 max_logins); 622 628 void bfa_fcs_rport_uf_recv(struct bfa_fcs_rport_s *rport, ··· 623 633 624 634 struct bfa_fcs_rport_s *bfa_fcs_rport_create(struct bfa_fcs_lport_s *port, 625 635 u32 pid); 626 - void bfa_fcs_rport_start(struct bfa_fcs_lport_s *port, struct fchs_s *rx_fchs, 627 - struct fc_logi_s *plogi_rsp); 628 636 void bfa_fcs_rport_plogi_create(struct bfa_fcs_lport_s *port, 629 637 struct fchs_s *rx_fchs, 630 638 struct fc_logi_s *plogi);
-142
drivers/scsi/bfa/bfa_fcs_lport.c
··· 938 938 } 939 939 940 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 - 959 - /* 960 941 * PWWN & PID based Lookup for a R-Port in the Port R-Port Queue 961 942 */ 962 943 struct bfa_fcs_rport_s * ··· 5626 5645 return &fcs->fabric.bport; 5627 5646 } 5628 5647 5629 - wwn_t 5630 - bfa_fcs_lport_get_rport(struct bfa_fcs_lport_s *port, wwn_t wwn, int index, 5631 - int nrports, bfa_boolean_t bwwn) 5632 - { 5633 - struct list_head *qh, *qe; 5634 - struct bfa_fcs_rport_s *rport = NULL; 5635 - int i; 5636 - struct bfa_fcs_s *fcs; 5637 - 5638 - if (port == NULL || nrports == 0) 5639 - return (wwn_t) 0; 5640 - 5641 - fcs = port->fcs; 5642 - bfa_trc(fcs, (u32) nrports); 5643 - 5644 - i = 0; 5645 - qh = &port->rport_q; 5646 - qe = bfa_q_first(qh); 5647 - 5648 - while ((qe != qh) && (i < nrports)) { 5649 - rport = (struct bfa_fcs_rport_s *) qe; 5650 - if (bfa_ntoh3b(rport->pid) > 0xFFF000) { 5651 - qe = bfa_q_next(qe); 5652 - bfa_trc(fcs, (u32) rport->pwwn); 5653 - bfa_trc(fcs, rport->pid); 5654 - bfa_trc(fcs, i); 5655 - continue; 5656 - } 5657 - 5658 - if (bwwn) { 5659 - if (!memcmp(&wwn, &rport->pwwn, 8)) 5660 - break; 5661 - } else { 5662 - if (i == index) 5663 - break; 5664 - } 5665 - 5666 - i++; 5667 - qe = bfa_q_next(qe); 5668 - } 5669 - 5670 - bfa_trc(fcs, i); 5671 - if (rport) 5672 - return rport->pwwn; 5673 - else 5674 - return (wwn_t) 0; 5675 - } 5676 - 5677 5648 void 5678 5649 bfa_fcs_lport_get_rport_quals(struct bfa_fcs_lport_s *port, 5679 5650 struct bfa_rport_qualifier_s rports[], int *nrports) ··· 5754 5821 return &vport->lport; 5755 5822 5756 5823 return NULL; 5757 - } 5758 - 5759 - /* 5760 - * API corresponding to NPIV_VPORT_GETINFO. 5761 - */ 5762 - void 5763 - bfa_fcs_lport_get_info(struct bfa_fcs_lport_s *port, 5764 - struct bfa_lport_info_s *port_info) 5765 - { 5766 - 5767 - bfa_trc(port->fcs, port->fabric->fabric_name); 5768 - 5769 - if (port->vport == NULL) { 5770 - /* 5771 - * This is a Physical port 5772 - */ 5773 - port_info->port_type = BFA_LPORT_TYPE_PHYSICAL; 5774 - 5775 - /* 5776 - * @todo : need to fix the state & reason 5777 - */ 5778 - port_info->port_state = 0; 5779 - port_info->offline_reason = 0; 5780 - 5781 - port_info->port_wwn = bfa_fcs_lport_get_pwwn(port); 5782 - port_info->node_wwn = bfa_fcs_lport_get_nwwn(port); 5783 - 5784 - port_info->max_vports_supp = 5785 - bfa_lps_get_max_vport(port->fcs->bfa); 5786 - port_info->num_vports_inuse = 5787 - port->fabric->num_vports; 5788 - port_info->max_rports_supp = BFA_FCS_MAX_RPORTS_SUPP; 5789 - port_info->num_rports_inuse = port->num_rports; 5790 - } else { 5791 - /* 5792 - * This is a virtual port 5793 - */ 5794 - port_info->port_type = BFA_LPORT_TYPE_VIRTUAL; 5795 - 5796 - /* 5797 - * @todo : need to fix the state & reason 5798 - */ 5799 - port_info->port_state = 0; 5800 - port_info->offline_reason = 0; 5801 - 5802 - port_info->port_wwn = bfa_fcs_lport_get_pwwn(port); 5803 - port_info->node_wwn = bfa_fcs_lport_get_nwwn(port); 5804 - } 5805 5824 } 5806 5825 5807 5826 void ··· 6453 6568 } 6454 6569 6455 6570 /* 6456 - * Cleanup notification from fabric SM on link timer expiry. 6457 - */ 6458 - void 6459 - bfa_fcs_vport_cleanup(struct bfa_fcs_vport_s *vport) 6460 - { 6461 - vport->vport_stats.fab_cleanup++; 6462 - } 6463 - 6464 - /* 6465 6571 * Stop notification from fabric SM. To be invoked from within FCS. 6466 6572 */ 6467 6573 void ··· 6572 6696 vport->lport.port_cfg.preboot_vp = BFA_TRUE; 6573 6697 6574 6698 return rc; 6575 - } 6576 - 6577 - /* 6578 - * Use this function to findout if this is a pbc vport or not. 6579 - * 6580 - * @param[in] vport - pointer to bfa_fcs_vport_t. 6581 - * 6582 - * @returns None 6583 - */ 6584 - bfa_boolean_t 6585 - bfa_fcs_is_pbc_vport(struct bfa_fcs_vport_s *vport) 6586 - { 6587 - 6588 - if (vport && (vport->lport.port_cfg.preboot_vp == BFA_TRUE)) 6589 - return BFA_TRUE; 6590 - else 6591 - return BFA_FALSE; 6592 - 6593 6699 } 6594 6700 6595 6701 /*
-36
drivers/scsi/bfa/bfa_fcs_rport.c
··· 2646 2646 bfa_sm_send_event(rport, RPSM_EVENT_ADDRESS_DISC); 2647 2647 return rport; 2648 2648 } 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 - } 2670 2649 2671 2650 /* 2672 2651 * Called by bport/vport to handle PLOGI received from a new remote port. ··· 3059 3080 struct bfa_fcs_rport_s *rport; 3060 3081 3061 3082 rport = bfa_fcs_lport_get_rport_by_pwwn(port, rpwwn); 3062 - if (rport == NULL) { 3063 - /* 3064 - * TBD Error handling 3065 - */ 3066 - } 3067 - 3068 - return rport; 3069 - } 3070 - 3071 - struct bfa_fcs_rport_s * 3072 - bfa_fcs_rport_lookup_by_nwwn(struct bfa_fcs_lport_s *port, wwn_t rnwwn) 3073 - { 3074 - struct bfa_fcs_rport_s *rport; 3075 - 3076 - rport = bfa_fcs_lport_get_rport_by_nwwn(port, rnwwn); 3077 3083 if (rport == NULL) { 3078 3084 /* 3079 3085 * TBD Error handling