On Tue, 2012-02-28 at 13:47 -0800, Roland Dreier wrote: > From: Roland Dreier <roland@xxxxxxxxxxxxxxx> > > If we do have a cmd, we need to set nport_handle in our CTIO or else the > firmware will reject the IOCB and we'll get > > qla2x00_error_entry: error entry, type 0x12 status 0x8 > > (status 0x8 is "invalid parameter" and in this case it means 0000 is the > wrong nport_handle) > > Signed-off-by: Roland Dreier <roland@xxxxxxxxxxxxxxx> > --- > drivers/scsi/qla2xxx/qla_target.c | 3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c > index a2dabb4..83136fa 100644 > --- a/drivers/scsi/qla2xxx/qla_target.c > +++ b/drivers/scsi/qla2xxx/qla_target.c > @@ -2186,8 +2186,7 @@ static int __qla_tgt_send_term_exchange(struct scsi_qla_host *vha, struct qla_tg > > ctio24 = (ctio7_to_24xx_t *)pkt; > ctio24->entry_type = CTIO_TYPE7; > - if (cmd == NULL) > - ctio24->nport_handle = CTIO7_NHANDLE_UNRECOGNIZED; > + ctio24->nport_handle = cmd ? cmd->loop_id : CTIO7_NHANDLE_UNRECOGNIZED; > ctio24->timeout = __constant_cpu_to_le16(QLA_TGT_TIMEOUT); > ctio24->vp_index = vha->vp_idx; > ctio24->initiator_id[0] = atio->u.isp24.fcp_hdr.s_id[2]; Applied. Thanks alot for tracking this down Roland & Arun! --nab -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html