- 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
This commit is contained in:
Stanislaw Gruszka
2007-09-05 11:38:19 +00:00
parent df886318a9
commit fbb45ff0f7
2 changed files with 9 additions and 13 deletions

View File

@@ -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);

View File

@@ -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;
}