Lines Matching refs:lport

77  * @lport:	    Local exchange port
86 struct fc_lport *lport;
463 static int fc_seq_send_locked(struct fc_lport *lport, struct fc_seq *sp,
499 error = lport->tt.frame_send(lport, fp);
518 * @lport: The local port that the exchange will be sent on
525 int fc_seq_send(struct fc_lport *lport, struct fc_seq *sp, struct fc_frame *fp)
531 error = fc_seq_send_locked(lport, sp, fp);
807 * @lport: The local port that the exchange is for
812 static struct fc_exch *fc_exch_em_alloc(struct fc_lport *lport,
878 ep->lp = lport;
897 * @lport: The local port that will own the exchange
905 static struct fc_exch *fc_exch_alloc(struct fc_lport *lport,
911 list_for_each_entry(ema, &lport->ema_list, ema_list) {
913 ep = fc_exch_em_alloc(lport, ema->mp);
928 struct fc_lport *lport = mp->lport;
937 pr_err("host%u: lport %6.6x: xid %d invalid CPU %d\n:",
938 lport->host->host_no, lport->port_id, xid, cpu);
947 FC_LPORT_DBG(lport, "xid %x quarantined\n", xid);
984 * @lport: The local port that the exchange was for
990 static struct fc_exch *fc_exch_resp(struct fc_lport *lport,
997 ep = fc_exch_alloc(lport, fp);
1031 * @lport: The local port that the frame was sent to
1038 static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport,
1093 ep = fc_exch_resp(lport, mp, fp);
1281 struct fc_lport *lport = ep->lp;
1288 fp = fc_frame_alloc(lport, 0);
1325 lport->tt.frame_send(lport, fp);
1346 struct fc_lport *lport;
1349 lport = fr_dev(rx_fp);
1351 fp = fc_frame_alloc(lport, sizeof(*rp));
1399 lport->tt.frame_send(lport, fp);
1467 * @lport: The local port that received the request
1474 struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp)
1478 WARN_ON(lport != fr_dev(fp));
1482 list_for_each_entry(ema, &lport->ema_list, ema_list)
1484 fc_seq_lookup_recip(lport, ema->mp, fp) == FC_RJT_NONE)
1502 * @lport: The local port that received the request
1509 static void fc_exch_recv_req(struct fc_lport *lport, struct fc_exch_mgr *mp,
1520 lport = fc_vport_id_lookup(lport, ntoh24(fh->fh_d_id));
1521 if (!lport) {
1525 fr_dev(fp) = lport;
1534 return fc_lport_recv(lport, fp);
1536 reject = fc_seq_lookup_recip(lport, mp, fp);
1555 fc_lport_recv(lport, fp);
1558 FC_LPORT_DBG(lport, "exch/seq lookup failed: reject %x\n",
1831 struct fc_lport *lport;
1836 lport = fr_dev(rx_fp);
1838 fp = fc_frame_alloc(lport, sizeof(*acc));
1848 lport->tt.frame_send(lport, fp);
1863 struct fc_lport *lport;
1868 lport = fr_dev(rx_fp);
1870 fp = fc_frame_alloc(lport, sizeof(*rjt));
1882 lport->tt.frame_send(lport, fp);
1924 * @lport: The local port that the exchange pool is on
1934 static void fc_exch_pool_reset(struct fc_lport *lport,
1944 if ((lport == ep->lp) &&
1970 * @lport: The local port whose EMs are to be reset
1979 void fc_exch_mgr_reset(struct fc_lport *lport, u32 sid, u32 did)
1984 list_for_each_entry(ema, &lport->ema_list, ema_list) {
1986 fc_exch_pool_reset(lport,
1995 * @lport: The local port
2000 static struct fc_exch *fc_exch_lookup(struct fc_lport *lport, u32 xid)
2004 list_for_each_entry(ema, &lport->ema_list, ema_list)
2018 struct fc_lport *lport;
2028 lport = fr_dev(rfp);
2038 if (sid == fc_host_port_id(lport->host))
2043 FC_LPORT_DBG(lport,
2048 ep = fc_exch_lookup(lport, xid);
2050 FC_LPORT_DBG(lport,
2061 fp = fc_frame_alloc(lport, sizeof(*acc));
2082 lport->tt.frame_send(lport, fp);
2140 * @lport: The local port to send the frame on
2175 struct fc_seq *fc_exch_seq_send(struct fc_lport *lport,
2189 ep = fc_exch_alloc(lport, fp);
2200 ep->r_a_tov = lport->r_a_tov;
2201 ep->lp = lport;
2209 if (ep->xid <= lport->lro_xid && fh->fh_r_ctl == FC_RCTL_DD_UNSOL_CMD) {
2214 if (unlikely(lport->tt.frame_send(lport, fp)))
2245 struct fc_lport *lport;
2250 lport = ep->lp;
2252 fp = fc_frame_alloc(lport, sizeof(*rrq));
2268 lport->port_id, FC_TYPE_ELS,
2271 if (fc_exch_seq_send(lport, fp, fc_exch_rrq_resp, NULL, ep,
2272 lport->e_d_tov))
2295 struct fc_lport *lport;
2302 lport = fr_dev(fp);
2312 xid = fc_host_port_id(lport->host) == sid ?
2314 ep = fc_exch_lookup(lport, xid);
2358 * fc_exch_update_stats() - update exches stats to lport
2359 * @lport: The local port to update exchange manager stats
2361 void fc_exch_update_stats(struct fc_lport *lport)
2367 st = &lport->host_stats;
2369 list_for_each_entry(ema, &lport->ema_list, ema_list) {
2384 * @lport: The local port to add the exchange manager to
2388 struct fc_exch_mgr_anchor *fc_exch_mgr_add(struct fc_lport *lport,
2401 list_add_tail(&ema->ema_list, &lport->ema_list);
2435 * @src: Source lport to clone exchange managers from
2436 * @dst: New lport that takes references to all the exchange managers
2456 * @lport: The local port that the new EM will be associated with
2462 struct fc_exch_mgr *fc_exch_mgr_alloc(struct fc_lport *lport,
2475 FC_LPORT_DBG(lport, "Invalid min_xid 0x:%x and max_xid 0x:%x\n",
2488 mp->lport = lport;
2532 if (!fc_exch_mgr_add(lport, mp, match)) {
2555 * @lport: The local port whose EMs are to be freed
2557 void fc_exch_mgr_free(struct fc_lport *lport)
2562 list_for_each_entry_safe(ema, next, &lport->ema_list, ema_list)
2571 * @lport: The local port the frame was received on
2575 struct fc_lport *lport,
2586 return list_entry(lport->ema_list.prev,
2590 list_for_each_entry(ema, &lport->ema_list, ema_list) {
2599 * @lport: The local port the frame was received on
2602 void fc_exch_recv(struct fc_lport *lport, struct fc_frame *fp)
2608 /* lport lock ? */
2609 if (!lport || lport->state == LPORT_ST_DISABLED) {
2610 FC_LIBFC_DBG("Receiving frames for an lport that "
2617 ema = fc_find_ema(f_ctl, lport, fh);
2619 FC_LPORT_DBG(lport, "Unable to find Exchange Manager Anchor,"
2646 fc_exch_recv_req(lport, ema->mp, fp);
2649 FC_LPORT_DBG(lport, "dropping invalid frame (eof %x)",
2658 * @lport: The local port to initialize the exchange layer for
2660 int fc_exch_init(struct fc_lport *lport)
2662 if (!lport->tt.exch_mgr_reset)
2663 lport->tt.exch_mgr_reset = fc_exch_mgr_reset;