mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
Synchronize with Feral CVS repository:
Hmm. Just in case INI_ANY and INI_NONE are not defined, define them here. This is for the case of external software including isp_tpublic.h only. Fix some misapplied flags. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@261 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: isp_tpublic.h,v 1.38 2007/12/02 22:02:04 mjacob Exp $ */
|
||||
/* $Id: isp_tpublic.h,v 1.39 2007/12/03 18:29:46 mjacob Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1997-2007 by Matthew Jacob
|
||||
* All rights reserved.
|
||||
@@ -195,6 +195,12 @@ typedef struct tmd_notify {
|
||||
} tmd_notify_t;
|
||||
#define LUN_ANY 0xffff
|
||||
#define TGT_ANY ((uint64_t) -1)
|
||||
#ifdef INI_ANY
|
||||
#define INI_ANY ((uint64_t) -1)
|
||||
#endif
|
||||
#ifndef INI_NONE
|
||||
#define INI_NONE ((uint64_t) 0)
|
||||
#endif
|
||||
#define TAG_ANY ((uint64_t) 0)
|
||||
#define MATCH_TMD(tmd, iid, lun, tag) \
|
||||
( \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: isp_linux.c,v 1.209 2007/12/02 22:02:06 mjacob Exp $ */
|
||||
/* $Id: isp_linux.c,v 1.210 2007/12/03 04:31:52 mjacob Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1997-2007 by Matthew Jacob
|
||||
* All rights reserved.
|
||||
@@ -1677,10 +1677,10 @@ isp_target_start_ctio(ispsoftc_t *isp, tmd_xact_t *xact)
|
||||
} else {
|
||||
cto->ct_resid = 0;
|
||||
}
|
||||
isp_prt(isp, ISP_LOGTDEBUG0, "CTIO2[%llx] scsi sts %x flags %x resid %d", tmd->cd_tagval, tmd->cd_scsi_status, cto->ct_flags, resid);
|
||||
if (cto->ct_flags & CT2_SENDSTATUS) {
|
||||
cto->ct_flags |= CT2_CCINCR;
|
||||
}
|
||||
isp_prt(isp, ISP_LOGTDEBUG0, "CTIO2[%llx] scsi sts %x flags %x resid %d", tmd->cd_tagval, tmd->cd_scsi_status, cto->ct_flags, resid);
|
||||
} else {
|
||||
ct_entry_t *cto = (ct_entry_t *) local;
|
||||
|
||||
@@ -1720,10 +1720,10 @@ isp_target_start_ctio(ispsoftc_t *isp, tmd_xact_t *xact)
|
||||
cto->ct_resid = resid;
|
||||
}
|
||||
}
|
||||
isp_prt(isp, ISP_LOGTDEBUG0, "CTIO[%llx] scsi sts %x resid %d cd_lflags %x", tmd->cd_tagval, tmd->cd_scsi_status, resid, xact->td_hflags);
|
||||
if (cto->ct_flags & CT_SENDSTATUS) {
|
||||
cto->ct_flags |= CT_CCINCR;
|
||||
}
|
||||
isp_prt(isp, ISP_LOGTDEBUG0, "CTIO[%llx] scsi sts %x resid %d cd_lflags %x", tmd->cd_tagval, tmd->cd_scsi_status, resid, xact->td_hflags);
|
||||
}
|
||||
|
||||
if (isp_getrqentry(isp, &nxti, &optr, &qe)) {
|
||||
@@ -2387,7 +2387,7 @@ isp_handle_platform_ctio(ispsoftc_t *isp, void *arg)
|
||||
char *sp = (char *)ct;
|
||||
sp += CTIO_SENSE_OFFSET;
|
||||
MEMCPY(tmd->cd_sense, sp, QLTM_SENSELEN);
|
||||
xact->td_lflags |= CDF_SNSVALID;
|
||||
tmd->cd_flags |= CDF_SNSVALID;
|
||||
}
|
||||
if ((ct->ct_flags & CT_DATAMASK) != CT_NO_DATA) {
|
||||
resid = ct->ct_resid;
|
||||
@@ -2475,7 +2475,7 @@ isp_target_putback_atio(ispsoftc_t *isp, tmd_cmd_t *tmd)
|
||||
isp_prt(isp, ISP_LOGWARN, "%s: Request Queue Overflow", __FUNCTION__);
|
||||
return (-ENOMEM);
|
||||
}
|
||||
isp_prt(isp, ISP_LOGINFO, "[%llx] resource putback being sent", tmd->cd_tagval);
|
||||
isp_prt(isp, ISP_LOGTDEBUG0, "[%llx] resource putback being sent", tmd->cd_tagval);
|
||||
MEMZERO(local, sizeof (local));
|
||||
if (IS_FC(isp)) {
|
||||
at2_entry_t *at = (at2_entry_t *) local;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: isp_pci.c,v 1.145 2007/12/02 22:02:06 mjacob Exp $ */
|
||||
/* $Id: isp_pci.c,v 1.146 2007/12/03 04:31:52 mjacob Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1997-2007 by Matthew Jacob
|
||||
* All rights reserved.
|
||||
@@ -1490,7 +1490,7 @@ tdma_mk(ispsoftc_t *isp, tmd_xact_t *xact, ct_entry_t *cto, uint32_t *nxtip, uin
|
||||
cto->ct_scsi_status, cto->ct_resid, "<END>");
|
||||
isp_put_ctio(isp, cto, qe);
|
||||
if (cto->ct_flags & CT_CCINCR) {
|
||||
tmd->cd_flags &= ~CDFL_RESRC_FILL;
|
||||
tmd->cd_lflags &= ~CDFL_RESRC_FILL;
|
||||
}
|
||||
return (CMD_QUEUED);
|
||||
}
|
||||
@@ -1714,7 +1714,7 @@ tdma_mk(ispsoftc_t *isp, tmd_xact_t *xact, ct_entry_t *cto, uint32_t *nxtip, uin
|
||||
*nxtip = nxti;
|
||||
isp_prt(isp, ISP_LOGTDEBUG2, "[%llx]: map %d segments at %p for handle 0x%x", tmd->cd_tagval, new_seg_cnt, xact->td_data, cto->ct_syshandle);
|
||||
if (sflags & CT_CCINCR) {
|
||||
tmd->cd_flags &= ~CDFL_RESRC_FILL;
|
||||
tmd->cd_lflags &= ~CDFL_RESRC_FILL;
|
||||
}
|
||||
return (CMD_QUEUED);
|
||||
}
|
||||
@@ -2051,7 +2051,7 @@ tdma_mkfc(ispsoftc_t *isp, tmd_xact_t *xact, ct2_entry_t *cto, uint32_t *nxtip,
|
||||
uint32_t curi, nxti;
|
||||
uint32_t bc, last_synthetic_count;
|
||||
long xfcnt; /* must be signed */
|
||||
int nseg, seg, ovseg, seglim, new_seg_cnt, ccincr = 0;
|
||||
int nseg, seg, ovseg, seglim, new_seg_cnt;
|
||||
#ifdef ALLOW_SYNTHETIC_CTIO
|
||||
ct2_entry_t *cto2 = NULL, ct2;
|
||||
#endif
|
||||
@@ -2081,7 +2081,7 @@ tdma_mkfc(ispsoftc_t *isp, tmd_xact_t *xact, ct2_entry_t *cto, uint32_t *nxtip,
|
||||
}
|
||||
ISP_TDQE(isp, "tdma_mkfc[no data]", curi, qe);
|
||||
if (cto->ct_flags & CT2_CCINCR) {
|
||||
tmd->cd_flags &= ~CDFL_RESRC_FILL;
|
||||
tmd->cd_lflags &= ~CDFL_RESRC_FILL;
|
||||
}
|
||||
return (CMD_QUEUED);
|
||||
}
|
||||
@@ -2160,7 +2160,7 @@ tdma_mkfc(ispsoftc_t *isp, tmd_xact_t *xact, ct2_entry_t *cto, uint32_t *nxtip,
|
||||
* Reset fields in the second CTIO2 as appropriate.
|
||||
*/
|
||||
cto2->ct_flags &= ~(CT2_FLAG_MMASK|CT2_DATAMASK|CT2_FASTPOST);
|
||||
cto2->ct_flags |= CT2_NO_DATA|CT2_NO_DATA|CT2_FLAG_MODE1;
|
||||
cto2->ct_flags |= CT2_NO_DATA|CT2_FLAG_MODE1;
|
||||
cto2->ct_seg_count = 0;
|
||||
cto2->ct_reloff = 0;
|
||||
MEMZERO(&cto2->rsp, sizeof (cto2->rsp));
|
||||
@@ -2176,13 +2176,15 @@ tdma_mkfc(ispsoftc_t *isp, tmd_xact_t *xact, ct2_entry_t *cto, uint32_t *nxtip,
|
||||
}
|
||||
cto2->rsp.m1.ct_scsi_status = swd;
|
||||
if (cto2->ct_flags & CT2_CCINCR) {
|
||||
ccincr = 1;
|
||||
tmd->cd_lflags &= ~CDFL_RESRC_FILL;
|
||||
}
|
||||
#else
|
||||
cto->ct_flags &= ~(CT2_SENDSTATUS|CT2_CCINCR|CT2_FASTPOST);
|
||||
cto->ct_resid = 0;
|
||||
cto->rsp.m0.ct_scsi_status = 0;
|
||||
#endif
|
||||
} else if ((cto->ct_flags & (CT2_SENDSTATUS|CT2_CCINCR)) == (CT2_SENDSTATUS|CT2_CCINCR)) {
|
||||
tmd->cd_lflags &= ~CDFL_RESRC_FILL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2426,9 +2428,6 @@ mbxsync:
|
||||
}
|
||||
ISP_TDQE(isp, "tdma_mkfc", isp->isp_reqidx, cto);
|
||||
*nxtip = nxti;
|
||||
if (ccincr) {
|
||||
tmd->cd_flags &= ~CDFL_RESRC_FILL;
|
||||
}
|
||||
return (CMD_QUEUED);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user