Lines Matching defs:lport

518  * @lport: libfc fc_lport to send from
530 struct fc_lport *lport,
576 memcpy(vn->fd_mac, fip->get_src_addr(lport), ETH_ALEN);
577 hton24(vn->fd_fc_id, lport->port_id);
578 put_unaligned_be64(lport->wwpn, &vn->fd_wwpn);
591 * @lport: The local port
604 static int fcoe_ctlr_encaps(struct fcoe_ctlr *fip, struct fc_lport *lport,
625 if (lport->point_to_multipoint) {
660 memcpy(mac->fd_mac, fip->get_src_addr(lport), ETH_ALEN);
684 * @lport: libfc fc_lport to send from
697 int fcoe_ctlr_els_send(struct fcoe_ctlr *fip, struct fc_lport *lport,
774 fip->update_mac(lport, mac);
790 if (fcoe_ctlr_encaps(fip, lport, op, skb, ntoh24(fh->fh_d_id)))
1136 struct fc_lport *lport = fip->lp;
1283 fr_dev(fp) = lport;
1286 this_cpu_inc(lport->stats->RxFrames);
1287 this_cpu_add(lport->stats->RxWords, skb->len / FIP_BPW);
1289 fc_exch_recv(lport, fp);
1317 struct fc_lport *lport = fip->lp;
1356 if (!lport->port_id) {
1357 LIBFCOE_FIP_DBG(fip, "lport not logged in, resoliciting\n");
1421 vn_port = fc_vport_id_lookup(lport,
1423 if (vn_port && (vn_port == lport)) {
1425 this_cpu_inc(lport->stats->VLinkFailureCount);
1453 this_cpu_inc(lport->stats->VLinkFailureCount);
1457 mutex_lock(&lport->lp_mutex);
1458 list_for_each_entry(vn_port, &lport->vports, list)
1460 mutex_unlock(&lport->lp_mutex);
1470 vn_port = fc_vport_id_lookup(lport,
1485 if (vn_port == lport)
1884 * @lport: The local port
1897 int fcoe_ctlr_recv_flogi(struct fcoe_ctlr *fip, struct fc_lport *lport,
2112 * @lport: The lport which is receiving the event
2118 static void fcoe_ctlr_vn_rport_callback(struct fc_lport *lport,
2122 struct fcoe_ctlr *fip = lport->disc.priv;
2156 * @lport: The local port
2160 static void fcoe_ctlr_disc_stop_locked(struct fc_lport *lport)
2164 mutex_lock(&lport->disc.disc_mutex);
2165 list_for_each_entry_rcu(rdata, &lport->disc.rports, peers) {
2171 lport->disc.disc_callback = NULL;
2172 mutex_unlock(&lport->disc.disc_mutex);
2177 * @lport: The local port
2182 static void fcoe_ctlr_disc_stop(struct fc_lport *lport)
2184 struct fcoe_ctlr *fip = lport->disc.priv;
2187 fcoe_ctlr_disc_stop_locked(lport);
2193 * @lport: The local port
2198 static void fcoe_ctlr_disc_stop_final(struct fc_lport *lport)
2200 fcoe_ctlr_disc_stop(lport);
2486 struct fc_lport *lport = fip->lp;
2496 mutex_lock(&lport->disc.disc_mutex);
2497 rdata = fc_rport_create(lport, port_id);
2499 mutex_unlock(&lport->disc.disc_mutex);
2503 mutex_unlock(&lport->disc.disc_mutex);
2506 rdata->disc_id = lport->disc.disc_id;
2544 struct fc_lport *lport = fip->lp;
2549 rdata = fc_rport_lookup(lport, port_id);
2640 struct fc_lport *lport = fip->lp;
2649 rdata = fc_rport_lookup(lport, new->rdata.ids.port_id);
2693 struct fc_lport *lport = fip->lp;
2700 mutex_lock(&lport->disc.disc_mutex);
2701 list_for_each_entry_rcu(rdata, &lport->disc.rports, peers) {
2721 mutex_unlock(&lport->disc.disc_mutex);
2995 * @lport: The local port
3001 static void fcoe_ctlr_disc_recv(struct fc_lport *lport, struct fc_frame *fp)
3018 * The lport lock is held during this call. The callback must be done
3019 * later, without holding either the lport or discovery locks.
3024 struct fc_lport *lport)
3026 struct fc_disc *disc = &lport->disc;
3047 struct fc_lport *lport = fip->lp;
3048 struct fc_disc *disc = &lport->disc;
3066 callback(lport, DISC_EV_SUCCESS);
3150 * @lport: The local port to be (re)configured
3155 * (fc_disc_config) while an lport is going through the libfc state
3160 static void fcoe_ctlr_mode_set(struct fc_lport *lport, struct fcoe_ctlr *fip,
3165 WARN_ON(lport->state != LPORT_ST_RESET &&
3166 lport->state != LPORT_ST_DISABLED);
3169 lport->rport_priv_size = sizeof(struct fcoe_rport);
3170 lport->point_to_multipoint = 1;
3171 lport->tt.disc_recv_req = fcoe_ctlr_disc_recv;
3172 lport->tt.disc_start = fcoe_ctlr_disc_start;
3173 lport->tt.disc_stop = fcoe_ctlr_disc_stop;
3174 lport->tt.disc_stop_final = fcoe_ctlr_disc_stop_final;
3177 lport->rport_priv_size = 0;
3178 lport->point_to_multipoint = 0;
3179 lport->tt.disc_recv_req = NULL;
3180 lport->tt.disc_start = NULL;
3181 lport->tt.disc_stop = NULL;
3182 lport->tt.disc_stop_final = NULL;
3183 priv = lport;
3186 fc_disc_config(lport, priv);
3191 * @lport: The local port to configure libfc for
3198 int fcoe_libfc_config(struct fc_lport *lport, struct fcoe_ctlr *fip,
3202 memcpy(&lport->tt, tt, sizeof(*tt));
3203 if (init_fcp && fc_fcp_init(lport))
3205 fc_exch_init(lport);
3206 fc_elsct_init(lport);
3207 fc_lport_init(lport);
3208 fc_disc_init(lport);
3209 fcoe_ctlr_mode_set(lport, fip, fip->mode);
3237 struct fc_lport *lport = ctlr->lp;
3252 fcoe_ctlr_mode_set(lport, ctlr, ctlr->mode);