Preserve CAM_DIS_DISCONNECT as passed up from SIM (like
CAM_TAG_ACTION_VALID and CAM_DIR_MASK). Remove redundant CAM_DEBUG line. Spiff up CAM_DEBUG printout for commands and move the printout up to the top where we can see it, even for the pending_ua/pending_ca cass. Add missing newline in a CAM_DEBUG.
This commit is contained in:
parent
bbd986658b
commit
978be15898
@ -1347,7 +1347,8 @@ targstart(struct cam_periph *periph, union ccb *start_ccb)
|
||||
desc = (struct targ_cmd_desc *)atio->ccb_h.ccb_descr;
|
||||
|
||||
/* Is this a tagged request? */
|
||||
flags = atio->ccb_h.flags & (CAM_TAG_ACTION_VALID|CAM_DIR_MASK);
|
||||
flags = atio->ccb_h.flags &
|
||||
(CAM_DIS_DISCONNECT|CAM_TAG_ACTION_VALID|CAM_DIR_MASK);
|
||||
|
||||
/*
|
||||
* If we are done with the transaction, tell the
|
||||
@ -1428,9 +1429,6 @@ targdone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
return;
|
||||
}
|
||||
|
||||
CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH,
|
||||
("targdone %x\n", done_ccb->ccb_h.func_code));
|
||||
|
||||
CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH,
|
||||
("targdone %x\n", done_ccb->ccb_h.func_code));
|
||||
|
||||
@ -1454,6 +1452,18 @@ targdone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CAMDEBUG
|
||||
{
|
||||
int i;
|
||||
char dcb[128];
|
||||
for (dcb[0] = 0, i = 0; i < atio->cdb_len; i++) {
|
||||
snprintf(dcb, sizeof dcb,
|
||||
"%s %02x", dcb, cdb[i] & 0xff);
|
||||
}
|
||||
CAM_DEBUG(periph->path,
|
||||
CAM_DEBUG_PERIPH, ("cdb:%s\n", dcb));
|
||||
}
|
||||
#endif
|
||||
if (atio->sense_len != 0) {
|
||||
CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH,
|
||||
("ATIO with sense_len\n"));
|
||||
@ -1476,7 +1486,8 @@ targdone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
&& cdb[0] != INQUIRY) {
|
||||
|
||||
CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH,
|
||||
("pending_ca %d pending_ua %dn", istate->pending_ca, istate->pending_ua));
|
||||
("pending_ca %d pending_ua %d\n",
|
||||
istate->pending_ca, istate->pending_ua));
|
||||
|
||||
/* Pending UA, tell initiator */
|
||||
/* Direction is always relative to the initator */
|
||||
@ -1513,10 +1524,6 @@ targdone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
if (pending_ca == CA_UNIT_ATTN)
|
||||
istate->pending_ua = UA_NONE;
|
||||
|
||||
CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH,
|
||||
("cdb[..] = %x %x %x %x %x %x\n",
|
||||
cdb[0], cdb[1], cdb[2], cdb[3],
|
||||
cdb[4], cdb[5]));
|
||||
/*
|
||||
* Determine the type of incoming command and
|
||||
* setup our buffer for a response.
|
||||
|
Loading…
x
Reference in New Issue
Block a user