ct_rsp = &ha->ct_sns->p.rsp;
 
        /* Prepare CT arguments -- port_id */
-       ct_req->req.port_id.port_id[0] = fcport->d_id.b.domain;
-       ct_req->req.port_id.port_id[1] = fcport->d_id.b.area;
-       ct_req->req.port_id.port_id[2] = fcport->d_id.b.al_pa;
+       ct_req->req.port_id.port_id = port_id_to_be_id(fcport->d_id);
 
        /* Execute MS IOCB */
        rval = qla2x00_issue_iocb(vha, ha->ms_iocb, ha->ms_iocb_dma,
                rval = QLA_FUNCTION_FAILED;
        } else {
                /* Populate fc_port_t entry. */
-               fcport->d_id.b.domain = ct_rsp->rsp.ga_nxt.port_id[0];
-               fcport->d_id.b.area = ct_rsp->rsp.ga_nxt.port_id[1];
-               fcport->d_id.b.al_pa = ct_rsp->rsp.ga_nxt.port_id[2];
+               fcport->d_id = be_to_port_id(ct_rsp->rsp.ga_nxt.port_id);
 
                memcpy(fcport->node_name, ct_rsp->rsp.ga_nxt.node_name,
                    WWN_SIZE);
                /* Set port IDs in switch info list. */
                for (i = 0; i < ha->max_fibre_devices; i++) {
                        gid_data = &ct_rsp->rsp.gid_pt.entries[i];
-                       list[i].d_id.b.domain = gid_data->port_id[0];
-                       list[i].d_id.b.area = gid_data->port_id[1];
-                       list[i].d_id.b.al_pa = gid_data->port_id[2];
+                       list[i].d_id = be_to_port_id(gid_data->port_id);
                        memset(list[i].fabric_port_name, 0, WWN_SIZE);
                        list[i].fp_speed = PORT_SPEED_UNKNOWN;
 
                ct_rsp = &ha->ct_sns->p.rsp;
 
                /* Prepare CT arguments -- port_id */
-               ct_req->req.port_id.port_id[0] = list[i].d_id.b.domain;
-               ct_req->req.port_id.port_id[1] = list[i].d_id.b.area;
-               ct_req->req.port_id.port_id[2] = list[i].d_id.b.al_pa;
+               ct_req->req.port_id.port_id = port_id_to_be_id(list[i].d_id);
 
                /* Execute MS IOCB */
                rval = qla2x00_issue_iocb(vha, ha->ms_iocb, ha->ms_iocb_dma,
                ct_rsp = &ha->ct_sns->p.rsp;
 
                /* Prepare CT arguments -- port_id */
-               ct_req->req.port_id.port_id[0] = list[i].d_id.b.domain;
-               ct_req->req.port_id.port_id[1] = list[i].d_id.b.area;
-               ct_req->req.port_id.port_id[2] = list[i].d_id.b.al_pa;
+               ct_req->req.port_id.port_id = port_id_to_be_id(list[i].d_id);
 
                /* Execute MS IOCB */
                rval = qla2x00_issue_iocb(vha, ha->ms_iocb, ha->ms_iocb_dma,
        ct_req = qla2x00_prep_ct_req(ct_sns, RFT_ID_CMD, RFT_ID_RSP_SIZE);
 
        /* Prepare CT arguments -- port_id, FC-4 types */
-       ct_req->req.rft_id.port_id[0] = vha->d_id.b.domain;
-       ct_req->req.rft_id.port_id[1] = vha->d_id.b.area;
-       ct_req->req.rft_id.port_id[2] = vha->d_id.b.al_pa;
+       ct_req->req.rft_id.port_id = port_id_to_be_id(vha->d_id);
        ct_req->req.rft_id.fc4_types[2] = 0x01;         /* FCP-3 */
 
        if (vha->flags.nvme_enabled)
        ct_req = qla2x00_prep_ct_req(ct_sns, RFF_ID_CMD, RFF_ID_RSP_SIZE);
 
        /* Prepare CT arguments -- port_id, FC-4 feature, FC-4 type */
-       ct_req->req.rff_id.port_id[0] = d_id->b.domain;
-       ct_req->req.rff_id.port_id[1] = d_id->b.area;
-       ct_req->req.rff_id.port_id[2] = d_id->b.al_pa;
+       ct_req->req.rff_id.port_id = port_id_to_be_id(*d_id);
        ct_req->req.rff_id.fc4_feature = fc4feature;
        ct_req->req.rff_id.fc4_type = fc4type;          /* SCSI - FCP */
 
        ct_req = qla2x00_prep_ct_req(ct_sns, RNN_ID_CMD, RNN_ID_RSP_SIZE);
 
        /* Prepare CT arguments -- port_id, node_name */
-       ct_req->req.rnn_id.port_id[0] = vha->d_id.b.domain;
-       ct_req->req.rnn_id.port_id[1] = vha->d_id.b.area;
-       ct_req->req.rnn_id.port_id[2] = vha->d_id.b.al_pa;
+       ct_req->req.rnn_id.port_id = port_id_to_be_id(vha->d_id);
        memcpy(ct_req->req.rnn_id.node_name, vha->node_name, WWN_SIZE);
 
        sp->u.iocb_cmd.u.ctarg.req_size = RNN_ID_REQ_SIZE;
                ct_rsp = &ha->ct_sns->p.rsp;
 
                /* Prepare CT arguments -- port_id */
-               ct_req->req.port_id.port_id[0] = list[i].d_id.b.domain;
-               ct_req->req.port_id.port_id[1] = list[i].d_id.b.area;
-               ct_req->req.port_id.port_id[2] = list[i].d_id.b.al_pa;
+               ct_req->req.port_id.port_id = port_id_to_be_id(list[i].d_id);
 
                /* Execute MS IOCB */
                rval = qla2x00_issue_iocb(vha, ha->ms_iocb, ha->ms_iocb_dma,
                ct_rsp = &ha->ct_sns->p.rsp;
 
                /* Prepare CT arguments -- port_id */
-               ct_req->req.port_id.port_id[0] = list[i].d_id.b.domain;
-               ct_req->req.port_id.port_id[1] = list[i].d_id.b.area;
-               ct_req->req.port_id.port_id[2] = list[i].d_id.b.al_pa;
+               ct_req->req.port_id.port_id = port_id_to_be_id(list[i].d_id);
 
                /* Execute MS IOCB */
                rval = qla2x00_issue_iocb(vha, ha->ms_iocb, ha->ms_iocb_dma,
        if (res)
                ql_dbg(ql_dbg_disc, vha, 0x2066,
                    "Async done-%s fail res %x rscn gen %d ID %3phC. %8phC\n",
-                   sp->name, res, sp->gen1, ct_req->req.port_id.port_id,
+                   sp->name, res, sp->gen1, &ct_req->req.port_id.port_id,
                    ct_rsp->rsp.gpn_id.port_name);
        else
                ql_dbg(ql_dbg_disc, vha, 0x2066,
                    "Async done-%s good rscn gen %d ID %3phC. %8phC\n",
-                   sp->name, sp->gen1, ct_req->req.port_id.port_id,
+                   sp->name, sp->gen1, &ct_req->req.port_id.port_id,
                    ct_rsp->rsp.gpn_id.port_name);
 
        memset(&ea, 0, sizeof(ea));
        memcpy(ea.port_name, ct_rsp->rsp.gpn_id.port_name, WWN_SIZE);
        ea.sp = sp;
-       ea.id.b.domain = ct_req->req.port_id.port_id[0];
-       ea.id.b.area = ct_req->req.port_id.port_id[1];
-       ea.id.b.al_pa = ct_req->req.port_id.port_id[2];
+       ea.id = be_to_port_id(ct_req->req.port_id.port_id);
        ea.rc = res;
        ea.event = FCME_GPNID_DONE;
 
        ct_req = qla2x00_prep_ct_req(ct_sns, GPN_ID_CMD, GPN_ID_RSP_SIZE);
 
        /* GPN_ID req */
-       ct_req->req.port_id.port_id[0] = id->b.domain;
-       ct_req->req.port_id.port_id[1] = id->b.area;
-       ct_req->req.port_id.port_id[2] = id->b.al_pa;
+       ct_req->req.port_id.port_id = port_id_to_be_id(*id);
 
        sp->u.iocb_cmd.u.ctarg.req_size = GPN_ID_REQ_SIZE;
        sp->u.iocb_cmd.u.ctarg.rsp_size = GPN_ID_RSP_SIZE;
 
        ql_dbg(ql_dbg_disc, vha, 0x2067,
            "Async-%s hdl=%x ID %3phC.\n", sp->name,
-           sp->handle, ct_req->req.port_id.port_id);
+           sp->handle, &ct_req->req.port_id.port_id);
 
        rval = qla2x00_start_sp(sp);
        if (rval != QLA_SUCCESS)
            GNN_ID_RSP_SIZE);
 
        /* GNN_ID req */
-       ct_req->req.port_id.port_id[0] = fcport->d_id.b.domain;
-       ct_req->req.port_id.port_id[1] = fcport->d_id.b.area;
-       ct_req->req.port_id.port_id[2] = fcport->d_id.b.al_pa;
+       ct_req->req.port_id.port_id = port_id_to_be_id(fcport->d_id);
 
 
        /* req & rsp use the same buffer */
            GFPN_ID_RSP_SIZE);
 
        /* GFPN_ID req */
-       ct_req->req.port_id.port_id[0] = fcport->d_id.b.domain;
-       ct_req->req.port_id.port_id[1] = fcport->d_id.b.area;
-       ct_req->req.port_id.port_id[2] = fcport->d_id.b.al_pa;
+       ct_req->req.port_id.port_id = port_id_to_be_id(fcport->d_id);
 
 
        /* req & rsp use the same buffer */
 
 
 static inline
 struct scsi_qla_host *qlt_find_host_by_d_id(struct scsi_qla_host *vha,
-       uint8_t *d_id)
+                                           be_id_t d_id)
 {
        struct scsi_qla_host *host;
        uint32_t key = 0;
 
-       if ((vha->d_id.b.area == d_id[1]) && (vha->d_id.b.domain == d_id[0]) &&
-           (vha->d_id.b.al_pa == d_id[2]))
+       if (vha->d_id.b.area == d_id.area &&
+           vha->d_id.b.domain == d_id.domain &&
+           vha->d_id.b.al_pa == d_id.al_pa)
                return vha;
 
-       key  = (uint32_t)d_id[0] << 16;
-       key |= (uint32_t)d_id[1] <<  8;
-       key |= (uint32_t)d_id[2];
+       key  = d_id.domain << 16;
+       key |= d_id.area << 8;
+       key |= d_id.al_pa;
 
        host = btree_lookup32(&vha->hw->tgt.host_map, key);
        if (!host)
                        ql_dbg(ql_dbg_tgt, vha, 0xe03e,
                            "qla_target(%d): Received ATIO_TYPE7 "
                            "with unknown d_id %x:%x:%x\n", vha->vp_idx,
-                           atio->u.isp24.fcp_hdr.d_id[0],
-                           atio->u.isp24.fcp_hdr.d_id[1],
-                           atio->u.isp24.fcp_hdr.d_id[2]);
+                           atio->u.isp24.fcp_hdr.d_id.domain,
+                           atio->u.isp24.fcp_hdr.d_id.area,
+                           atio->u.isp24.fcp_hdr.d_id.al_pa);
 
 
                        qlt_queue_unknown_atio(vha, atio, ha_locked);
        /* At this point tgt could be already dead */
 }
 
-static int qla24xx_get_loop_id(struct scsi_qla_host *vha, const uint8_t *s_id,
+static int qla24xx_get_loop_id(struct scsi_qla_host *vha, be_id_t s_id,
        uint16_t *loop_id)
 {
        struct qla_hw_data *ha = vha->hw;
        gid = gid_list;
        res = -ENOENT;
        for (i = 0; i < entries; i++) {
-               if ((gid->al_pa == s_id[2]) &&
-                   (gid->area == s_id[1]) &&
-                   (gid->domain == s_id[0])) {
+               if (gid->al_pa == s_id.al_pa &&
+                   gid->area == s_id.area &&
+                   gid->domain == s_id.domain) {
                        *loop_id = le16_to_cpu(gid->loop_id);
                        res = 0;
                        break;
        resp->fcp_hdr_le.f_ctl[1] = *p++;
        resp->fcp_hdr_le.f_ctl[2] = *p;
 
-       resp->fcp_hdr_le.d_id[0] = abts->fcp_hdr_le.s_id[0];
-       resp->fcp_hdr_le.d_id[1] = abts->fcp_hdr_le.s_id[1];
-       resp->fcp_hdr_le.d_id[2] = abts->fcp_hdr_le.s_id[2];
-       resp->fcp_hdr_le.s_id[0] = abts->fcp_hdr_le.d_id[0];
-       resp->fcp_hdr_le.s_id[1] = abts->fcp_hdr_le.d_id[1];
-       resp->fcp_hdr_le.s_id[2] = abts->fcp_hdr_le.d_id[2];
+       resp->fcp_hdr_le.d_id = abts->fcp_hdr_le.s_id;
+       resp->fcp_hdr_le.s_id = abts->fcp_hdr_le.d_id;
 
        resp->exchange_addr_to_abort = abts->exchange_addr_to_abort;
        if (mcmd->fc_tm_rsp == FCP_TMF_CMPL) {
        resp->fcp_hdr_le.f_ctl[1] = *p++;
        resp->fcp_hdr_le.f_ctl[2] = *p;
        if (ids_reversed) {
-               resp->fcp_hdr_le.d_id[0] = abts->fcp_hdr_le.d_id[0];
-               resp->fcp_hdr_le.d_id[1] = abts->fcp_hdr_le.d_id[1];
-               resp->fcp_hdr_le.d_id[2] = abts->fcp_hdr_le.d_id[2];
-               resp->fcp_hdr_le.s_id[0] = abts->fcp_hdr_le.s_id[0];
-               resp->fcp_hdr_le.s_id[1] = abts->fcp_hdr_le.s_id[1];
-               resp->fcp_hdr_le.s_id[2] = abts->fcp_hdr_le.s_id[2];
+               resp->fcp_hdr_le.d_id = abts->fcp_hdr_le.d_id;
+               resp->fcp_hdr_le.s_id = abts->fcp_hdr_le.s_id;
        } else {
-               resp->fcp_hdr_le.d_id[0] = abts->fcp_hdr_le.s_id[0];
-               resp->fcp_hdr_le.d_id[1] = abts->fcp_hdr_le.s_id[1];
-               resp->fcp_hdr_le.d_id[2] = abts->fcp_hdr_le.s_id[2];
-               resp->fcp_hdr_le.s_id[0] = abts->fcp_hdr_le.d_id[0];
-               resp->fcp_hdr_le.s_id[1] = abts->fcp_hdr_le.d_id[1];
-               resp->fcp_hdr_le.s_id[2] = abts->fcp_hdr_le.d_id[2];
+               resp->fcp_hdr_le.d_id = abts->fcp_hdr_le.s_id;
+               resp->fcp_hdr_le.s_id = abts->fcp_hdr_le.d_id;
        }
        resp->exchange_addr_to_abort = abts->exchange_addr_to_abort;
        if (status == FCP_TMF_CMPL) {
        tmp = (CTIO7_FLAGS_STATUS_MODE_1 | CTIO7_FLAGS_TERMINATE);
 
        if (mcmd) {
-               ctio->initiator_id[0] = entry->fcp_hdr_le.s_id[0];
-               ctio->initiator_id[1] = entry->fcp_hdr_le.s_id[1];
-               ctio->initiator_id[2] = entry->fcp_hdr_le.s_id[2];
+               ctio->initiator_id = entry->fcp_hdr_le.s_id;
 
                if (mcmd->flags & QLA24XX_MGMT_ABORT_IO_ATTR_VALID)
                        tmp |= (mcmd->abort_io_attr << 9);
                else if (qpair->retry_term_cnt & 1)
                        tmp |= (0x4 << 9);
        } else {
-               ctio->initiator_id[0] = entry->fcp_hdr_le.d_id[0];
-               ctio->initiator_id[1] = entry->fcp_hdr_le.d_id[1];
-               ctio->initiator_id[2] = entry->fcp_hdr_le.d_id[2];
+               ctio->initiator_id = entry->fcp_hdr_le.d_id;
 
                if (qpair->retry_term_cnt & 1)
                        tmp |= (0x4 << 9);
  * XXX does not go through the list of other port (which may have cmds
  *     for the same lun)
  */
-static void abort_cmds_for_lun(struct scsi_qla_host *vha,
-                               u64 lun, uint8_t *s_id)
+static void abort_cmds_for_lun(struct scsi_qla_host *vha, u64 lun, be_id_t s_id)
 {
        struct qla_tgt_sess_op *op;
        struct qla_tgt_cmd *cmd;
        struct qla_hw_data *ha = vha->hw;
        struct fc_port *sess;
        uint32_t tag = abts->exchange_addr_to_abort;
-       uint8_t s_id[3];
+       be_id_t s_id;
        int rc;
        unsigned long flags;
 
 
        ql_dbg(ql_dbg_tgt_mgt, vha, 0xf011,
            "qla_target(%d): task abort (s_id=%x:%x:%x, "
-           "tag=%d, param=%x)\n", vha->vp_idx, abts->fcp_hdr_le.s_id[2],
-           abts->fcp_hdr_le.s_id[1], abts->fcp_hdr_le.s_id[0], tag,
+           "tag=%d, param=%x)\n", vha->vp_idx, abts->fcp_hdr_le.s_id.domain,
+           abts->fcp_hdr_le.s_id.area, abts->fcp_hdr_le.s_id.al_pa, tag,
            le32_to_cpu(abts->fcp_hdr_le.parameter));
 
-       s_id[0] = abts->fcp_hdr_le.s_id[2];
-       s_id[1] = abts->fcp_hdr_le.s_id[1];
-       s_id[2] = abts->fcp_hdr_le.s_id[0];
+       s_id = le_id_to_be(abts->fcp_hdr_le.s_id);
 
        spin_lock_irqsave(&ha->tgt.sess_lock, flags);
        sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, s_id);
        ctio->nport_handle = mcmd->sess->loop_id;
        ctio->timeout = cpu_to_le16(QLA_TGT_TIMEOUT);
        ctio->vp_index = ha->vp_idx;
-       ctio->initiator_id[0] = atio->u.isp24.fcp_hdr.s_id[2];
-       ctio->initiator_id[1] = atio->u.isp24.fcp_hdr.s_id[1];
-       ctio->initiator_id[2] = atio->u.isp24.fcp_hdr.s_id[0];
+       ctio->initiator_id = be_id_to_le(atio->u.isp24.fcp_hdr.s_id);
        ctio->exchange_addr = atio->u.isp24.exchange_addr;
        temp = (atio->u.isp24.attr << 9)|
                CTIO7_FLAGS_STATUS_MODE_1 | CTIO7_FLAGS_SEND_STATUS;
        ctio->nport_handle = cmd->sess->loop_id;
        ctio->timeout = cpu_to_le16(QLA_TGT_TIMEOUT);
        ctio->vp_index = vha->vp_idx;
-       ctio->initiator_id[0] = atio->u.isp24.fcp_hdr.s_id[2];
-       ctio->initiator_id[1] = atio->u.isp24.fcp_hdr.s_id[1];
-       ctio->initiator_id[2] = atio->u.isp24.fcp_hdr.s_id[0];
+       ctio->initiator_id = be_id_to_le(atio->u.isp24.fcp_hdr.s_id);
        ctio->exchange_addr = atio->u.isp24.exchange_addr;
        temp = (atio->u.isp24.attr << 9) |
            CTIO7_FLAGS_STATUS_MODE_1 | CTIO7_FLAGS_SEND_STATUS;
        pkt->handle |= CTIO_COMPLETION_HANDLE_MARK;
        pkt->nport_handle = cpu_to_le16(prm->cmd->loop_id);
        pkt->timeout = cpu_to_le16(QLA_TGT_TIMEOUT);
-       pkt->initiator_id[0] = atio->u.isp24.fcp_hdr.s_id[2];
-       pkt->initiator_id[1] = atio->u.isp24.fcp_hdr.s_id[1];
-       pkt->initiator_id[2] = atio->u.isp24.fcp_hdr.s_id[0];
+       pkt->initiator_id = be_id_to_le(atio->u.isp24.fcp_hdr.s_id);
        pkt->exchange_addr = atio->u.isp24.exchange_addr;
        temp = atio->u.isp24.attr << 9;
        pkt->u.status0.flags |= cpu_to_le16(temp);
        pkt->handle |= CTIO_COMPLETION_HANDLE_MARK;
        pkt->nport_handle = cpu_to_le16(prm->cmd->loop_id);
        pkt->timeout = cpu_to_le16(QLA_TGT_TIMEOUT);
-       pkt->initiator_id[0] = atio->u.isp24.fcp_hdr.s_id[2];
-       pkt->initiator_id[1] = atio->u.isp24.fcp_hdr.s_id[1];
-       pkt->initiator_id[2] = atio->u.isp24.fcp_hdr.s_id[0];
+       pkt->initiator_id = be_id_to_le(atio->u.isp24.fcp_hdr.s_id);
        pkt->exchange_addr   = atio->u.isp24.exchange_addr;
 
        /* silence compile warning */
        ctio24->nport_handle = CTIO7_NHANDLE_UNRECOGNIZED;
        ctio24->timeout = cpu_to_le16(QLA_TGT_TIMEOUT);
        ctio24->vp_index = vha->vp_idx;
-       ctio24->initiator_id[0] = atio->u.isp24.fcp_hdr.s_id[2];
-       ctio24->initiator_id[1] = atio->u.isp24.fcp_hdr.s_id[1];
-       ctio24->initiator_id[2] = atio->u.isp24.fcp_hdr.s_id[0];
+       ctio24->initiator_id = be_id_to_le(atio->u.isp24.fcp_hdr.s_id);
        ctio24->exchange_addr = atio->u.isp24.exchange_addr;
        temp = (atio->u.isp24.attr << 9) | CTIO7_FLAGS_STATUS_MODE_1 |
                CTIO7_FLAGS_TERMINATE;
                return -ENODEV;
        }
 
-       id.b.al_pa = atio->u.isp24.fcp_hdr.s_id[2];
-       id.b.area = atio->u.isp24.fcp_hdr.s_id[1];
-       id.b.domain = atio->u.isp24.fcp_hdr.s_id[0];
+       id = be_to_port_id(atio->u.isp24.fcp_hdr.s_id);
        if (IS_SW_RESV_ADDR(id))
                return -EBUSY;
 
        u16 temp;
        port_id_t id;
 
-       id.b.al_pa = atio->u.isp24.fcp_hdr.s_id[2];
-       id.b.area = atio->u.isp24.fcp_hdr.s_id[1];
-       id.b.domain = atio->u.isp24.fcp_hdr.s_id[0];
-       id.b.rsvd_1 = 0;
+       id = be_to_port_id(atio->u.isp24.fcp_hdr.s_id);
 
        spin_lock_irqsave(&ha->tgt.sess_lock, flags);
        sess = qla2x00_find_fcport_by_nportid(vha, &id, 1);
        ctio24->nport_handle = sess->loop_id;
        ctio24->timeout = cpu_to_le16(QLA_TGT_TIMEOUT);
        ctio24->vp_index = vha->vp_idx;
-       ctio24->initiator_id[0] = atio->u.isp24.fcp_hdr.s_id[2];
-       ctio24->initiator_id[1] = atio->u.isp24.fcp_hdr.s_id[1];
-       ctio24->initiator_id[2] = atio->u.isp24.fcp_hdr.s_id[0];
+       ctio24->initiator_id = be_id_to_le(atio->u.isp24.fcp_hdr.s_id);
        ctio24->exchange_addr = atio->u.isp24.exchange_addr;
        temp = (atio->u.isp24.attr << 9) |
                CTIO7_FLAGS_STATUS_MODE_1 | CTIO7_FLAGS_SEND_STATUS |
 
 /* Must be called under tgt_mutex */
 static struct fc_port *qlt_make_local_sess(struct scsi_qla_host *vha,
-       uint8_t *s_id)
+                                          be_id_t s_id)
 {
        struct fc_port *sess = NULL;
        fc_port_t *fcport = NULL;
        int rc, global_resets;
        uint16_t loop_id = 0;
 
-       if ((s_id[0] == 0xFF) && (s_id[1] == 0xFC)) {
+       if (s_id.domain == 0xFF && s_id.area == 0xFC) {
                /*
                 * This is Domain Controller, so it should be
                 * OK to drop SCSI commands from it.
                 */
                ql_dbg(ql_dbg_tgt_mgt, vha, 0xf042,
                    "Unable to find initiator with S_ID %x:%x:%x",
-                   s_id[0], s_id[1], s_id[2]);
+                   s_id.domain, s_id.area, s_id.al_pa);
                return NULL;
        }
 
                ql_log(ql_log_info, vha, 0xf071,
                    "qla_target(%d): Unable to find "
                    "initiator with S_ID %x:%x:%x",
-                   vha->vp_idx, s_id[0], s_id[1],
-                   s_id[2]);
+                   vha->vp_idx, s_id.domain, s_id.area, s_id.al_pa);
 
                if (rc == -ENOENT) {
                        qlt_port_logo_t logo;
 
-                       sid_to_portid(s_id, &logo.id);
+                       logo.id = be_to_port_id(s_id);
                        logo.cmd_count = 1;
                        qlt_send_first_logo(vha, &logo);
                }
        struct qla_hw_data *ha = vha->hw;
        struct fc_port *sess = NULL;
        unsigned long flags = 0, flags2 = 0;
-       uint8_t s_id[3];
+       be_id_t s_id;
        int rc;
 
        spin_lock_irqsave(&ha->tgt.sess_lock, flags2);
        if (tgt->tgt_stop)
                goto out_term2;
 
-       s_id[0] = prm->abts.fcp_hdr_le.s_id[2];
-       s_id[1] = prm->abts.fcp_hdr_le.s_id[1];
-       s_id[2] = prm->abts.fcp_hdr_le.s_id[0];
+       s_id = le_id_to_be(prm->abts.fcp_hdr_le.s_id);
 
        sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, s_id);
        if (!sess) {
        struct qla_hw_data *ha = vha->hw;
        struct fc_port *sess;
        unsigned long flags;
-       uint8_t *s_id = NULL; /* to hide compiler warnings */
+       be_id_t s_id;
        int rc;
        u64 unpacked_lun;
        int fn;
                         */
                        ql_log(ql_log_warn, vha, 0xd03c,
                            "corrupted fcp frame SID[%3phN] OXID[%04x] EXCG[%x] %64phN\n",
-                           pkt->u.isp24.fcp_hdr.s_id,
+                           &pkt->u.isp24.fcp_hdr.s_id,
                            be16_to_cpu(pkt->u.isp24.fcp_hdr.ox_id),
                            le32_to_cpu(pkt->u.isp24.exchange_addr), pkt);