public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Joe Eykholt <jeykholt@cisco.com>
Cc: openfcoe-devel <devel@open-fcoe.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	"Love, Robert W" <robert.w.love@intel.com>
Subject: libfc fc_rport_recv_prli_req() changes for v2.6.35-rc2
Date: Wed, 09 Jun 2010 14:59:46 -0700	[thread overview]
Message-ID: <1276120786.18353.89.camel@haakon2.linux-iscsi.org> (raw)

Greetings Joe,

While doing a pull recently for v2.6.35-rc2, I ran into a merge conflict
below in drivers/scsi/libfc/fc_rport.c:fc_rport_recv_pril_req()
with the original PLOGI driven target provider hooks changes that I have
been including into the lio-core-2.6.git tree for tcm_fc.

>From taking a quick look, I assume that active and passing prov->prli()
calls need to appear under the new roles assignment, namely under:

      if (fcp_parm & FCP_SPPF_TARG_FCN)
              roles |= FC_RPORT_ROLE_FCP_TARGET;

for the upstream e44a21b726 commit.  Is there anything else that should
be taken into consideration to get this running again..?  

Best,

--nab

<<<<<<< HEAD

        /*
         * Go through all the service parameter pages and build
         * response.  If plen indicates longer SPP than standard,
         * use that.  The entire response has been pre-cleared above.
         */
        spp = &pp->spp;
        mutex_lock(&fc_prov_mutex);
        while (len >= plen) {
                spp->spp_type = rspp->spp_type;
                spp->spp_type_ext = rspp->spp_type_ext;
                resp = 0;

                if (rspp->spp_type < FC_FC4_PROV_SIZE) {
                        prov = fc_active_prov[rspp->spp_type];
                        if (prov)
                                resp = prov->prli(rdata, plen, rspp, spp);
                        prov = fc_passive_prov[rspp->spp_type];
                        if (prov) {
                                passive = prov->prli(rdata, plen, rspp, spp);
                                if (!resp || passive == FC_SPP_RESP_ACK)
                                        resp = passive;
                        }
                }
                if (!resp) {
                        if (spp->spp_flags & FC_SPP_EST_IMG_PAIR)
                                resp |= FC_SPP_RESP_CONF;
                        else
                                resp |= FC_SPP_RESP_INVL;
                }
                spp->spp_flags |= resp;
                len -= plen;
                rspp = (struct fc_els_spp *)((char *)rspp + plen);
                spp = (struct fc_els_spp *)((char *)spp + plen);
        }
        mutex_unlock(&fc_prov_mutex);

        /*
         * Send LS_ACC.  If this fails, the originator should retry.
         */
        f_ctl = FC_FC_EX_CTX | FC_FC_LAST_SEQ;
        f_ctl |= FC_FC_END_SEQ | FC_FC_SEQ_INIT;
        ep = fc_seq_exch(sp);
        fc_fill_fc_hdr(fp, FC_RCTL_ELS_REP, ep->did, ep->sid,
                       FC_TYPE_ELS, f_ctl, 0);
        lport->tt.seq_send(lport, sp, fp);

=======

        /* reinitialize remote port roles */
        rdata->ids.roles = FC_RPORT_ROLE_UNKNOWN;

        /*
         * Go through all the service parameter pages and build
         * response.  If plen indicates longer SPP than standard,
         * use that.  The entire response has been pre-cleared above.
         */
        spp = &pp->spp;
        while (len >= plen) {
                spp->spp_type = rspp->spp_type;
                spp->spp_type_ext = rspp->spp_type_ext;
                spp->spp_flags = rspp->spp_flags & FC_SPP_EST_IMG_PAIR;
                resp = FC_SPP_RESP_ACK;

                switch (rspp->spp_type) {
                case 0: /* common to all FC-4 types */
                        break;
                case FC_TYPE_FCP:
                        fcp_parm = ntohl(rspp->spp_params);
                        if (fcp_parm & FCP_SPPF_RETRY)
                                rdata->flags |= FC_RP_FLAGS_RETRY;
                        rdata->supported_classes = FC_COS_CLASS3;
                        if (fcp_parm & FCP_SPPF_INIT_FCN)
                                roles |= FC_RPORT_ROLE_FCP_INITIATOR;
                        if (fcp_parm & FCP_SPPF_TARG_FCN)
                                roles |= FC_RPORT_ROLE_FCP_TARGET;
                        rdata->ids.roles = roles;

                        spp->spp_params = htonl(lport->service_params);
                        break;
                default:
                        resp = FC_SPP_RESP_INVL;
                        break;
                }
                spp->spp_flags |= resp;
                len -= plen;
                rspp = (struct fc_els_spp *)((char *)rspp + plen);
                spp = (struct fc_els_spp *)((char *)spp + plen);
        }

        /*
         * Send LS_ACC.  If this fails, the originator should retry.
         */
        f_ctl = FC_FC_EX_CTX | FC_FC_LAST_SEQ;
        f_ctl |= FC_FC_END_SEQ | FC_FC_SEQ_INIT;
        ep = fc_seq_exch(sp);
        fc_fill_fc_hdr(fp, FC_RCTL_ELS_REP, ep->did, ep->sid,
                       FC_TYPE_ELS, f_ctl, 0);
        lport->tt.seq_send(lport, sp, fp);

>>>>>>> e44a21b7268a022c7749f521c06214145bd161e4


             reply	other threads:[~2010-06-09 21:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-09 21:59 Nicholas A. Bellinger [this message]
2010-06-09 22:12 ` [Open-FCoE] libfc fc_rport_recv_prli_req() changes for v2.6.35-rc2 Robert Love
2010-06-09 22:21   ` Nicholas A. Bellinger
2010-06-09 22:23 ` Joe Eykholt
2010-06-09 22:28   ` Nicholas A. Bellinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1276120786.18353.89.camel@haakon2.linux-iscsi.org \
    --to=nab@linux-iscsi.org \
    --cc=devel@open-fcoe.org \
    --cc=jeykholt@cisco.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=robert.w.love@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox