Merge tag 'fcoe' into fixes

3.10 fixes

Changed files
+31 -25
drivers
scsi
+1 -1
MAINTAINERS
··· 3220 3220 3221 3221 FCOE SUBSYSTEM (libfc, libfcoe, fcoe) 3222 3222 M: Robert Love <robert.w.love@intel.com> 3223 - L: devel@open-fcoe.org 3223 + L: fcoe-devel@open-fcoe.org 3224 3224 W: www.Open-FCoE.org 3225 3225 S: Supported 3226 3226 F: drivers/scsi/libfc/
+5 -10
drivers/scsi/fcoe/fcoe_ctlr.c
··· 1548 1548 { 1549 1549 struct fcoe_fcf *fcf; 1550 1550 struct fcoe_fcf *best = fip->sel_fcf; 1551 - struct fcoe_fcf *first; 1552 - 1553 - first = list_first_entry(&fip->fcfs, struct fcoe_fcf, list); 1554 1551 1555 1552 list_for_each_entry(fcf, &fip->fcfs, list) { 1556 1553 LIBFCOE_FIP_DBG(fip, "consider FCF fab %16.16llx " ··· 1565 1568 "" : "un"); 1566 1569 continue; 1567 1570 } 1568 - if (fcf->fabric_name != first->fabric_name || 1569 - fcf->vfid != first->vfid || 1570 - fcf->fc_map != first->fc_map) { 1571 + if (!best || fcf->pri < best->pri || best->flogi_sent) 1572 + best = fcf; 1573 + if (fcf->fabric_name != best->fabric_name || 1574 + fcf->vfid != best->vfid || 1575 + fcf->fc_map != best->fc_map) { 1571 1576 LIBFCOE_FIP_DBG(fip, "Conflicting fabric, VFID, " 1572 1577 "or FC-MAP\n"); 1573 1578 return NULL; 1574 1579 } 1575 - if (fcf->flogi_sent) 1576 - continue; 1577 - if (!best || fcf->pri < best->pri || best->flogi_sent) 1578 - best = fcf; 1579 1580 } 1580 1581 fip->sel_fcf = best; 1581 1582 if (best) {
+24 -13
drivers/scsi/libfc/fc_exch.c
··· 463 463 fc_exch_release(ep); /* drop hold for exch in mp */ 464 464 } 465 465 466 - /** 467 - * fc_seq_send() - Send a frame using existing sequence/exchange pair 468 - * @lport: The local port that the exchange will be sent on 469 - * @sp: The sequence to be sent 470 - * @fp: The frame to be sent on the exchange 471 - */ 472 - static int fc_seq_send(struct fc_lport *lport, struct fc_seq *sp, 466 + static int fc_seq_send_locked(struct fc_lport *lport, struct fc_seq *sp, 473 467 struct fc_frame *fp) 474 468 { 475 469 struct fc_exch *ep; ··· 473 479 u8 fh_type = fh->fh_type; 474 480 475 481 ep = fc_seq_exch(sp); 476 - WARN_ON((ep->esb_stat & ESB_ST_SEQ_INIT) != ESB_ST_SEQ_INIT); 482 + WARN_ON(!(ep->esb_stat & ESB_ST_SEQ_INIT)); 477 483 478 484 f_ctl = ntoh24(fh->fh_f_ctl); 479 485 fc_exch_setup_hdr(ep, fp, f_ctl); ··· 496 502 error = lport->tt.frame_send(lport, fp); 497 503 498 504 if (fh_type == FC_TYPE_BLS) 499 - return error; 505 + goto out; 500 506 501 507 /* 502 508 * Update the exchange and sequence flags, 503 509 * assuming all frames for the sequence have been sent. 504 510 * We can only be called to send once for each sequence. 505 511 */ 506 - spin_lock_bh(&ep->ex_lock); 507 512 ep->f_ctl = f_ctl & ~FC_FC_FIRST_SEQ; /* not first seq */ 508 513 if (f_ctl & FC_FC_SEQ_INIT) 509 514 ep->esb_stat &= ~ESB_ST_SEQ_INIT; 515 + out: 516 + return error; 517 + } 518 + 519 + /** 520 + * fc_seq_send() - Send a frame using existing sequence/exchange pair 521 + * @lport: The local port that the exchange will be sent on 522 + * @sp: The sequence to be sent 523 + * @fp: The frame to be sent on the exchange 524 + */ 525 + static int fc_seq_send(struct fc_lport *lport, struct fc_seq *sp, 526 + struct fc_frame *fp) 527 + { 528 + struct fc_exch *ep; 529 + int error; 530 + ep = fc_seq_exch(sp); 531 + spin_lock_bh(&ep->ex_lock); 532 + error = fc_seq_send_locked(lport, sp, fp); 510 533 spin_unlock_bh(&ep->ex_lock); 511 534 return error; 512 535 } ··· 640 629 if (fp) { 641 630 fc_fill_fc_hdr(fp, FC_RCTL_BA_ABTS, ep->did, ep->sid, 642 631 FC_TYPE_BLS, FC_FC_END_SEQ | FC_FC_SEQ_INIT, 0); 643 - error = fc_seq_send(ep->lp, sp, fp); 632 + error = fc_seq_send_locked(ep->lp, sp, fp); 644 633 } else 645 634 error = -ENOBUFS; 646 635 return error; ··· 1143 1132 f_ctl = FC_FC_LAST_SEQ | FC_FC_END_SEQ | FC_FC_SEQ_INIT; 1144 1133 f_ctl |= ep->f_ctl; 1145 1134 fc_fill_fc_hdr(fp, rctl, ep->did, ep->sid, fh_type, f_ctl, 0); 1146 - fc_seq_send(ep->lp, sp, fp); 1135 + fc_seq_send_locked(ep->lp, sp, fp); 1147 1136 } 1148 1137 1149 1138 /** ··· 1318 1307 ap->ba_low_seq_cnt = htons(sp->cnt); 1319 1308 } 1320 1309 sp = fc_seq_start_next_locked(sp); 1321 - spin_unlock_bh(&ep->ex_lock); 1322 1310 fc_seq_send_last(sp, fp, FC_RCTL_BA_ACC, FC_TYPE_BLS); 1311 + spin_unlock_bh(&ep->ex_lock); 1323 1312 fc_frame_free(rx_fp); 1324 1313 return; 1325 1314
+1 -1
drivers/scsi/libfc/fc_rport.c
··· 1962 1962 rdata->flags |= FC_RP_FLAGS_RETRY; 1963 1963 rdata->supported_classes = FC_COS_CLASS3; 1964 1964 1965 - if (!(lport->service_params & FC_RPORT_ROLE_FCP_INITIATOR)) 1965 + if (!(lport->service_params & FCP_SPPF_INIT_FCN)) 1966 1966 return 0; 1967 1967 1968 1968 spp->spp_flags |= rspp->spp_flags & FC_SPP_EST_IMG_PAIR;