From fbb45ff0f7f2ede1f79f3f4a7a83d8e122d91251 Mon Sep 17 00:00:00 2001 From: Stanislaw Gruszka Date: Wed, 5 Sep 2007 11:38:19 +0000 Subject: [PATCH] - Do not print lot of info about notify event. - Check bp->scst_tgt agains NULL only once when command is processed git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@183 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla_isp/linux/isp_linux.c | 6 +++--- qla_isp/linux/isp_scst.c | 16 ++++++---------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/qla_isp/linux/isp_linux.c b/qla_isp/linux/isp_linux.c index 92d47e001..14cfdd294 100644 --- a/qla_isp/linux/isp_linux.c +++ b/qla_isp/linux/isp_linux.c @@ -1390,7 +1390,7 @@ isp_taction(qact_e action, void *arg) rsp->abts_rsp_payload.ba_acc.high_seq_cnt = 0xffff; isp_notify_ack(isp, ins->qentry); } else if (ins->notify.nt_need_ack) { - isp_prt(isp, ISP_LOGINFO, "[%llx] Notify Code 0x%x (qevalid=%d) being acked", ins->notify.nt_tagval, ins->notify.nt_ncode, ins->qevalid); + isp_prt(isp, ISP_LOGDEBUG0, "[%llx] Notify Code 0x%x (qevalid=%d) being acked", ins->notify.nt_tagval, ins->notify.nt_ncode, ins->qevalid); if (ins->qevalid) { isp_notify_ack(isp, ins->qentry); } else { @@ -3057,7 +3057,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cmd, ...) break; default: if (isp_find_iid_wwn(isp, mp->nt_channel, loopid, &ins->notify.nt_iid) == 0) { - isp_prt(isp, ISP_LOGINFO, "cannot find WWN for loopid 0x%x for notify action 0x%x", loopid, mp->nt_ncode); + isp_prt(isp, ISP_LOGDEBUG0, "cannot find WWN for loopid 0x%x for notify action 0x%x", loopid, mp->nt_ncode); ins->notify.nt_iid = INI_ANY; } break; @@ -3069,7 +3069,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cmd, ...) } else { TAG_INSERT_INST(mp->nt_tagval, isp->isp_unit); } - isp_prt(isp, ISP_LOGINFO, "Notify Code 0x%x iid 0x%016llx tgt 0x%016llx lun %u tag %llx", + isp_prt(isp, ISP_LOGDEBUG0, "Notify Code 0x%x iid 0x%016llx tgt 0x%016llx lun %u tag %llx", mp->nt_ncode, (unsigned long long) mp->nt_iid, (unsigned long long) mp->nt_tgt, mp->nt_lun, mp->nt_tagval); CALL_PARENT_NOTIFY(isp, ins); diff --git a/qla_isp/linux/isp_scst.c b/qla_isp/linux/isp_scst.c index 17aa0ef9c..04a88e77f 100644 --- a/qla_isp/linux/isp_scst.c +++ b/qla_isp/linux/isp_scst.c @@ -321,11 +321,6 @@ alloc_ini(bus_t *bp, uint64_t iid) ini_t *nptr; char ini_name[24]; - if (!bp->scst_tgt) { - Eprintk("cannot find SCST target for incoming command\n"); - return (NULL); - } - nptr = kmalloc(sizeof(ini_t), GFP_KERNEL); if (!nptr) { Eprintk("cannot allocate initiator data\n"); @@ -910,21 +905,22 @@ scsi_target_handler(qact_e action, void *arg) { ini_t *ini; tmd_notify_t *np = arg; + spin_lock_irqsave(&scsi_target_lock, flags); - - // FIXME: good handle for all notifies and TGT_ALL, INI_ALL, ... - bp = bus_from_notify(arg); if (bp == NULL) { spin_unlock_irqrestore(&scsi_target_lock, flags); Eprintk("TMD_NOTIFY cannot find bus\n"); break; } - + ini = ini_from_notify(bp, np); if (ini == NULL) { spin_unlock_irqrestore(&scsi_target_lock, flags); - Eprintk("TMD_NOTIFY cannot find initiator\n"); + if (np->nt_iid != INI_ANY) { + Eprintk("TMD_NOTIFY cannot find initiator 0x%016llx\n", np->nt_iid); + } + /* only ack, we don't care about bus/lip resets and link up/down */ (*bp->h.r_action) (QIN_NOTIFY_ACK, arg); break; }