PERFORCE change 105417 for review
Matt Jacob
mjacob at FreeBSD.org
Thu Aug 31 19:26:41 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=105417
Change 105417 by mjacob at newisp on 2006/08/31 19:25:42
Various changes imported from work supported by Mendocino.
Affected files ...
.. //depot/projects/newisp/dev/isp/isp.c#6 edit
.. //depot/projects/newisp/dev/isp/isp_library.c#3 edit
.. //depot/projects/newisp/dev/isp/isp_library.h#3 edit
.. //depot/projects/newisp/dev/isp/isp_target.c#3 edit
.. //depot/projects/newisp/dev/isp/isp_target.h#3 edit
Differences ...
==== //depot/projects/newisp/dev/isp/isp.c#6 (text+ko) ====
@@ -1730,9 +1730,6 @@
icbp->icb_respaddr[RQRSP_ADDR3247] = DMA_WD2(isp->isp_result_dma);
icbp->icb_respaddr[RQRSP_ADDR4863] = DMA_WD3(isp->isp_result_dma);
- icbp->icb_rqstout = 0;
- icbp->icb_rspnsin = 0;
-
isp_prt(isp, ISP_LOGDEBUG0,
"isp_fibre_init: fwopt 0x%x xfwopt 0x%x zfwopt 0x%x",
icbp->icb_fwoptions, icbp->icb_xfwoptions, icbp->icb_zfwoptions);
@@ -1956,9 +1953,6 @@
DMA_WD3(isp->isp_result_dma), DMA_WD2(isp->isp_result_dma),
DMA_WD1(isp->isp_result_dma), DMA_WD0(isp->isp_result_dma));
- icbp->icb_rqstout = 0;
- icbp->icb_rspnsin = 0;
-
FC_SCRATCH_ACQUIRE(isp);
isp_put_icb_2400(isp, icbp, fcp->isp_scratch);
==== //depot/projects/newisp/dev/isp/isp_library.c#3 (text) ====
@@ -48,9 +48,9 @@
int
isp_save_xs(ispsoftc_t *isp, XS_T *xs, uint32_t *handlep)
{
- int i, j;
+ uint32_t i, j;
- for (j = isp->isp_lasthdls, i = 0; i < (int) isp->isp_maxcmds; i++) {
+ for (j = isp->isp_lasthdls, i = 0; i < isp->isp_maxcmds; i++) {
if (isp->isp_xflist[j] == NULL) {
break;
}
@@ -63,8 +63,9 @@
}
isp->isp_xflist[j] = xs;
*handlep = j+1;
- if (++j == isp->isp_maxcmds)
+ if (++j == isp->isp_maxcmds) {
j = 0;
+ }
isp->isp_lasthdls = (uint32_t)j;
return (0);
}
@@ -1183,17 +1184,19 @@
return (-1);
}
isp->isp_tgtlist[i] = xs;
- *handlep = i+1;
+ *handlep = (i+1) | 0x8000;
return (0);
}
void *
isp_find_xs_tgt(ispsoftc_t *isp, uint32_t handle)
{
- if (handle < 1 || handle > (uint32_t) isp->isp_maxcmds) {
+ if (handle == 0 || (handle & 0x8000) == 0 ||
+ (handle & 0x7fff) > isp->isp_maxcmds) {
+ isp_prt(isp, ISP_LOGERR, "bad handle in isp_find_xs_tgt");
return (NULL);
} else {
- return (isp->isp_tgtlist[handle - 1]);
+ return (isp->isp_tgtlist[(handle & 0x7fff) - 1]);
}
}
@@ -1204,7 +1207,7 @@
if (xs != NULL) {
for (i = 0; i < isp->isp_maxcmds; i++) {
if (isp->isp_tgtlist[i] == xs) {
- return ((uint32_t) i+1);
+ return ((i+1) & 0x7fff);
}
}
}
@@ -1214,10 +1217,15 @@
void
isp_destroy_tgt_handle(ispsoftc_t *isp, uint32_t handle)
{
- if (handle > 0 && handle <= (uint32_t) isp->isp_maxcmds) {
- isp->isp_tgtlist[handle - 1] = NULL;
+ if (handle == 0 || (handle & 0x8000) == 0 ||
+ (handle & 0x7fff) > isp->isp_maxcmds) {
+ isp_prt(isp, ISP_LOGERR,
+ "bad handle in isp_destroy_tgt_handle");
+ } else {
+ isp->isp_tgtlist[(handle & 0x7fff) - 1] = NULL;
}
}
+
void
isp_put_atio(ispsoftc_t *isp, at_entry_t *atsrc, at_entry_t *atdst)
{
@@ -1413,7 +1421,7 @@
{
int i;
isp_copy_out_hdr(isp, &ctsrc->ct_header, &ctdst->ct_header);
- ISP_IOXPUT_16(isp, ctsrc->ct_reserved, &ctdst->ct_reserved);
+ ISP_IOXPUT_16(isp, ctsrc->ct_syshandle, &ctdst->ct_syshandle);
ISP_IOXPUT_16(isp, ctsrc->ct_fwhandle, &ctdst->ct_fwhandle);
if (ISP_IS_SBUS(isp)) {
ISP_IOXPUT_8(isp, ctsrc->ct_iid, &ctdst->ct_lun);
@@ -1453,7 +1461,7 @@
{
int i;
isp_copy_in_hdr(isp, &ctsrc->ct_header, &ctdst->ct_header);
- ISP_IOXGET_16(isp, &ctsrc->ct_reserved, ctdst->ct_reserved);
+ ISP_IOXGET_16(isp, &ctsrc->ct_syshandle, ctdst->ct_syshandle);
ISP_IOXGET_16(isp, &ctsrc->ct_fwhandle, ctdst->ct_fwhandle);
if (ISP_IS_SBUS(isp)) {
ISP_IOXGET_8(isp, &ctsrc->ct_lun, ctdst->ct_iid);
@@ -1495,8 +1503,7 @@
{
int i;
isp_copy_out_hdr(isp, &ctsrc->ct_header, &ctdst->ct_header);
- ISP_IOXPUT_16(isp, ctsrc->ct_reserved, &ctdst->ct_reserved);
- ISP_IOXPUT_16(isp, ctsrc->ct_fwhandle, &ctdst->ct_fwhandle);
+ ISP_IOXPUT_32(isp, ctsrc->ct_syshandle, &ctdst->ct_syshandle);
ISP_IOXPUT_8(isp, ctsrc->ct_lun, &ctdst->ct_lun);
ISP_IOXPUT_8(isp, ctsrc->ct_iid, &ctdst->ct_iid);
ISP_IOXPUT_16(isp, ctsrc->ct_rxid, &ctdst->ct_rxid);
@@ -1579,8 +1586,7 @@
{
int i;
isp_copy_out_hdr(isp, &ctsrc->ct_header, &ctdst->ct_header);
- ISP_IOXPUT_16(isp, ctsrc->ct_reserved, &ctdst->ct_reserved);
- ISP_IOXPUT_16(isp, ctsrc->ct_fwhandle, &ctdst->ct_fwhandle);
+ ISP_IOXPUT_32(isp, ctsrc->ct_syshandle, &ctdst->ct_syshandle);
ISP_IOXPUT_16(isp, ctsrc->ct_iid, &ctdst->ct_iid);
ISP_IOXPUT_16(isp, ctsrc->ct_rxid, &ctdst->ct_rxid);
ISP_IOXPUT_16(isp, ctsrc->ct_flags, &ctdst->ct_flags);
@@ -1660,9 +1666,10 @@
void
isp_get_ctio2(ispsoftc_t *isp, ct2_entry_t *ctsrc, ct2_entry_t *ctdst)
{
+ int i;
+
isp_copy_in_hdr(isp, &ctsrc->ct_header, &ctdst->ct_header);
- ISP_IOXGET_16(isp, &ctsrc->ct_reserved, ctdst->ct_reserved);
- ISP_IOXGET_16(isp, &ctsrc->ct_fwhandle, ctdst->ct_fwhandle);
+ ISP_IOXGET_32(isp, &ctsrc->ct_syshandle, ctdst->ct_syshandle);
ISP_IOXGET_8(isp, &ctsrc->ct_lun, ctdst->ct_lun);
ISP_IOXGET_8(isp, &ctsrc->ct_iid, ctdst->ct_iid);
ISP_IOXGET_16(isp, &ctsrc->ct_rxid, ctdst->ct_rxid);
@@ -1672,14 +1679,82 @@
ISP_IOXGET_16(isp, &ctsrc->ct_seg_count, ctdst->ct_seg_count);
ISP_IOXGET_32(isp, &ctsrc->ct_reloff, ctdst->ct_reloff);
ISP_IOXGET_32(isp, &ctsrc->ct_resid, ctdst->ct_resid);
+ if ((ctdst->ct_flags & CT2_FLAG_MMASK) == CT2_FLAG_MODE0) {
+ ISP_IOXGET_32(isp, &ctsrc->rsp.m0._reserved,
+ ctdst->rsp.m0._reserved);
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m0._reserved2,
+ ctdst->rsp.m0._reserved2);
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m0.ct_scsi_status,
+ ctdst->rsp.m0.ct_scsi_status);
+ ISP_IOXGET_32(isp, &ctsrc->rsp.m0.ct_xfrlen,
+ ctdst->rsp.m0.ct_xfrlen);
+ if (ctdst->ct_header.rqs_entry_type == RQSTYPE_CTIO2) {
+ for (i = 0; i < ISP_RQDSEG_T2; i++) {
+ ISP_IOXGET_32(isp,
+ &ctsrc->rsp.m0.ct_dataseg[i].ds_base,
+ ctdst->rsp.m0.ct_dataseg[i].ds_base);
+ ISP_IOXGET_32(isp,
+ &ctsrc->rsp.m0.ct_dataseg[i].ds_count,
+ ctdst->rsp.m0.ct_dataseg[i].ds_count);
+ }
+ } else if (ctdst->ct_header.rqs_entry_type == RQSTYPE_CTIO3) {
+ for (i = 0; i < ISP_RQDSEG_T3; i++) {
+ ISP_IOXGET_32(isp,
+ &ctsrc->rsp.m0.ct_dataseg64[i].ds_base,
+ ctdst->rsp.m0.ct_dataseg64[i].ds_base);
+ ISP_IOXGET_32(isp,
+ &ctsrc->rsp.m0.ct_dataseg64[i].ds_basehi,
+ ctdst->rsp.m0.ct_dataseg64[i].ds_basehi);
+ ISP_IOXGET_32(isp,
+ &ctsrc->rsp.m0.ct_dataseg64[i].ds_count,
+ ctdst->rsp.m0.ct_dataseg64[i].ds_count);
+ }
+ } else if (ctdst->ct_header.rqs_entry_type == RQSTYPE_CTIO4) {
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m0.ct_dslist.ds_type,
+ ctdst->rsp.m0.ct_dslist.ds_type);
+ ISP_IOXGET_32(isp, &ctsrc->rsp.m0.ct_dslist.ds_segment,
+ ctdst->rsp.m0.ct_dslist.ds_segment);
+ ISP_IOXGET_32(isp, &ctsrc->rsp.m0.ct_dslist.ds_base,
+ ctdst->rsp.m0.ct_dslist.ds_base);
+ }
+ } else if ((ctdst->ct_flags & CT2_FLAG_MMASK) == CT2_FLAG_MODE1) {
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m1._reserved,
+ ctdst->rsp.m1._reserved);
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m1._reserved2,
+ ctdst->rsp.m1._reserved2);
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m1.ct_senselen,
+ ctdst->rsp.m1.ct_senselen);
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m1.ct_scsi_status,
+ ctdst->rsp.m1.ct_scsi_status);
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m1.ct_resplen,
+ ctdst->rsp.m1.ct_resplen);
+ for (i = 0; i < MAXRESPLEN; i++) {
+ ISP_IOXGET_8(isp, &ctsrc->rsp.m1.ct_resp[i],
+ ctdst->rsp.m1.ct_resp[i]);
+ }
+ } else {
+ ISP_IOXGET_32(isp, &ctsrc->rsp.m2._reserved,
+ ctdst->rsp.m2._reserved);
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m2._reserved2,
+ ctdst->rsp.m2._reserved2);
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m2._reserved3,
+ ctdst->rsp.m2._reserved3);
+ ISP_IOXGET_32(isp, &ctsrc->rsp.m2.ct_datalen,
+ ctdst->rsp.m2.ct_datalen);
+ ISP_IOXGET_32(isp, &ctsrc->rsp.m2.ct_fcp_rsp_iudata.ds_base,
+ ctdst->rsp.m2.ct_fcp_rsp_iudata.ds_base);
+ ISP_IOXGET_32(isp, &ctsrc->rsp.m2.ct_fcp_rsp_iudata.ds_count,
+ ctdst->rsp.m2.ct_fcp_rsp_iudata.ds_count);
+ }
}
void
isp_get_ctio2e(ispsoftc_t *isp, ct2e_entry_t *ctsrc, ct2e_entry_t *ctdst)
{
+ int i;
+
isp_copy_in_hdr(isp, &ctsrc->ct_header, &ctdst->ct_header);
- ISP_IOXGET_16(isp, &ctsrc->ct_reserved, ctdst->ct_reserved);
- ISP_IOXGET_16(isp, &ctsrc->ct_fwhandle, ctdst->ct_fwhandle);
+ ISP_IOXGET_32(isp, &ctsrc->ct_syshandle, ctdst->ct_syshandle);
ISP_IOXGET_16(isp, &ctsrc->ct_iid, ctdst->ct_iid);
ISP_IOXGET_16(isp, &ctsrc->ct_rxid, ctdst->ct_rxid);
ISP_IOXGET_16(isp, &ctsrc->ct_flags, ctdst->ct_flags);
@@ -1688,6 +1763,73 @@
ISP_IOXGET_16(isp, &ctsrc->ct_seg_count, ctdst->ct_seg_count);
ISP_IOXGET_32(isp, &ctsrc->ct_reloff, ctdst->ct_reloff);
ISP_IOXGET_32(isp, &ctsrc->ct_resid, ctdst->ct_resid);
+ if ((ctdst->ct_flags & CT2_FLAG_MMASK) == CT2_FLAG_MODE0) {
+ ISP_IOXGET_32(isp, &ctsrc->rsp.m0._reserved,
+ ctdst->rsp.m0._reserved);
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m0._reserved2,
+ ctdst->rsp.m0._reserved2);
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m0.ct_scsi_status,
+ ctdst->rsp.m0.ct_scsi_status);
+ ISP_IOXGET_32(isp, &ctsrc->rsp.m0.ct_xfrlen,
+ ctdst->rsp.m0.ct_xfrlen);
+ if (ctsrc->ct_header.rqs_entry_type == RQSTYPE_CTIO2) {
+ for (i = 0; i < ISP_RQDSEG_T2; i++) {
+ ISP_IOXGET_32(isp,
+ &ctsrc->rsp.m0.ct_dataseg[i].ds_base,
+ ctdst->rsp.m0.ct_dataseg[i].ds_base);
+ ISP_IOXGET_32(isp,
+ &ctsrc->rsp.m0.ct_dataseg[i].ds_count,
+ ctdst->rsp.m0.ct_dataseg[i].ds_count);
+ }
+ } else if (ctdst->ct_header.rqs_entry_type == RQSTYPE_CTIO3) {
+ for (i = 0; i < ISP_RQDSEG_T3; i++) {
+ ISP_IOXGET_32(isp,
+ &ctsrc->rsp.m0.ct_dataseg64[i].ds_base,
+ ctdst->rsp.m0.ct_dataseg64[i].ds_base);
+ ISP_IOXGET_32(isp,
+ &ctsrc->rsp.m0.ct_dataseg64[i].ds_basehi,
+ ctdst->rsp.m0.ct_dataseg64[i].ds_basehi);
+ ISP_IOXGET_32(isp,
+ &ctsrc->rsp.m0.ct_dataseg64[i].ds_count,
+ ctdst->rsp.m0.ct_dataseg64[i].ds_count);
+ }
+ } else if (ctdst->ct_header.rqs_entry_type == RQSTYPE_CTIO4) {
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m0.ct_dslist.ds_type,
+ ctdst->rsp.m0.ct_dslist.ds_type);
+ ISP_IOXGET_32(isp, &ctsrc->rsp.m0.ct_dslist.ds_segment,
+ ctdst->rsp.m0.ct_dslist.ds_segment);
+ ISP_IOXGET_32(isp, &ctsrc->rsp.m0.ct_dslist.ds_base,
+ ctdst->rsp.m0.ct_dslist.ds_base);
+ }
+ } else if ((ctdst->ct_flags & CT2_FLAG_MMASK) == CT2_FLAG_MODE1) {
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m1._reserved,
+ ctdst->rsp.m1._reserved);
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m1._reserved2,
+ ctdst->rsp.m1._reserved2);
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m1.ct_senselen,
+ ctdst->rsp.m1.ct_senselen);
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m1.ct_scsi_status,
+ ctdst->rsp.m1.ct_scsi_status);
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m1.ct_resplen,
+ ctdst->rsp.m1.ct_resplen);
+ for (i = 0; i < MAXRESPLEN; i++) {
+ ISP_IOXGET_8(isp, &ctsrc->rsp.m1.ct_resp[i],
+ ctdst->rsp.m1.ct_resp[i]);
+ }
+ } else {
+ ISP_IOXGET_32(isp, &ctsrc->rsp.m2._reserved,
+ ctdst->rsp.m2._reserved);
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m2._reserved2,
+ ctdst->rsp.m2._reserved2);
+ ISP_IOXGET_16(isp, &ctsrc->rsp.m2._reserved3,
+ ctdst->rsp.m2._reserved3);
+ ISP_IOXGET_32(isp, &ctsrc->rsp.m2.ct_datalen,
+ ctdst->rsp.m2.ct_datalen);
+ ISP_IOXGET_32(isp, &ctsrc->rsp.m2.ct_fcp_rsp_iudata.ds_base,
+ ctdst->rsp.m2.ct_fcp_rsp_iudata.ds_base);
+ ISP_IOXGET_32(isp, &ctsrc->rsp.m2.ct_fcp_rsp_iudata.ds_count,
+ ctdst->rsp.m2.ct_fcp_rsp_iudata.ds_count);
+ }
}
void
==== //depot/projects/newisp/dev/isp/isp_library.h#3 (text) ====
@@ -125,6 +125,8 @@
#include "isp_target.h"
#endif
+#define IS_TARGET_HANDLE(x) ((x) & 0x8000)
+
extern int isp_save_xs_tgt(ispsoftc_t *, void *, uint32_t *);
extern void *isp_find_xs_tgt(ispsoftc_t *, uint32_t);
extern uint32_t isp_find_tgt_handle(ispsoftc_t *, void *);
==== //depot/projects/newisp/dev/isp/isp_target.c#3 (text+ko) ====
@@ -53,8 +53,8 @@
"ATIO returned for lun %d because it was in the middle of Bus Device Reset "
"on bus %d";
static const char atior[] =
- "ATIO returned on for lun %d on from IID %d because a Bus Reset occurred "
- "on bus %d";
+ "ATIO returned on for lun %d on from loopid %d because a Bus Reset "
+ "occurred on bus %d";
static void isp_got_msg(ispsoftc_t *, in_entry_t *);
static void isp_got_msg_fc(ispsoftc_t *, in_fcentry_t *);
@@ -798,8 +798,8 @@
} else {
isp_put_notify_ack_fc(isp, na, (na_fcentry_t *)outp);
}
- isp_prt(isp, ISP_LOGTDEBUG0, "notify ack iid %u seqid %x flags "
- "%x tflags %x response %x", iid, na->na_seqid,
+ isp_prt(isp, ISP_LOGTDEBUG0, "notify ack loopid %u seqid %x "
+ "flags %x tflags %x response %x", iid, na->na_seqid,
na->na_flags, na->na_task_flags, na->na_response);
} else {
na_entry_t *na = (na_entry_t *) storage;
@@ -819,8 +819,8 @@
na->na_header.rqs_entry_type = RQSTYPE_NOTIFY_ACK;
na->na_header.rqs_entry_count = 1;
isp_put_notify_ack(isp, na, (na_entry_t *)outp);
- isp_prt(isp, ISP_LOGTDEBUG0, "notify ack iid %u lun %u tgt %u "
- "seqid %x event %x", na->na_iid, na->na_lun, na->na_tgt,
+ isp_prt(isp, ISP_LOGTDEBUG0, "notify ack loopid %u lun %u tgt "
+ "%u seqid %x event %x", na->na_iid, na->na_lun, na->na_tgt,
na->na_seqid, na->na_event);
}
ISP_TDQE(isp, "isp_notify_ack", (int) optr, storage);
@@ -901,7 +901,7 @@
default:
isp_prt(isp, ISP_LOGERR,
- "Unknown ATIO status 0x%x from initiator %d for lun %d",
+ "Unknown ATIO status 0x%x from loopid %d for lun %d",
aep->at_status, aep->at_iid, lun);
(void) isp_target_put_atio(isp, aep);
break;
@@ -990,7 +990,7 @@
default:
isp_prt(isp, ISP_LOGERR,
- "Unknown ATIO2 status 0x%x from initiator %d for lun %d",
+ "Unknown ATIO2 status 0x%x from loopid %d for lun %d",
aep->at_status, iid, lun);
(void) isp_target_put_atio(isp, aep);
break;
@@ -1006,8 +1006,9 @@
if (ct->ct_syshandle) {
xs = isp_find_xs_tgt(isp, ct->ct_syshandle);
- if (xs == NULL)
+ if (xs == NULL) {
pl = ISP_LOGALL;
+ }
} else {
xs = NULL;
}
@@ -1059,7 +1060,7 @@
if (fmsg == NULL)
fmsg = "ABORT TAG message sent by Initiator";
- isp_prt(isp, ISP_LOGWARN, "CTIO destroyed by %s", fmsg);
+ isp_prt(isp, ISP_LOGTDEBUG0, "CTIO destroyed by %s", fmsg);
break;
case CT_INVAL:
@@ -1160,14 +1161,15 @@
static void
isp_handle_ctio2(ispsoftc_t *isp, ct2_entry_t *ct)
{
- XS_T *xs;
+ void *xs;
int pl = ISP_LOGTDEBUG2;
char *fmsg = NULL;
if (ct->ct_syshandle) {
xs = isp_find_xs_tgt(isp, ct->ct_syshandle);
- if (xs == NULL)
+ if (xs == NULL) {
pl = ISP_LOGALL;
+ }
} else {
xs = NULL;
}
@@ -1197,7 +1199,7 @@
* status. These CTIOs are handled in that same way as
* CT_ABORTED ones, so just fall through here.
*/
- fmsg = "TARGET RESET Task Management Function Received";
+ fmsg = "TARGET RESET";
/*FALLTHROUGH*/
case CT_RESET:
if (fmsg == NULL)
@@ -1209,10 +1211,11 @@
* Bus Free and returns all outstanding CTIOs with the status
* set, then sends us an Immediate Notify entry.
*/
- if (fmsg == NULL)
- fmsg = "ABORT Task Management Function Received";
+ if (fmsg == NULL) {
+ fmsg = "ABORT";
+ }
- isp_prt(isp, ISP_LOGERR, "CTIO2 destroyed by %s: RX_ID=0x%x",
+ isp_prt(isp, ISP_LOGTDEBUG0, "CTIO2 destroyed by %s: RX_ID=0x%x",
fmsg, ct->ct_rxid);
break;
@@ -1250,7 +1253,7 @@
case CT_NOACK:
if (fmsg == NULL)
fmsg = "unacknowledged Immediate Notify pending";
- isp_prt(isp, ISP_LOGERR, "CTIO returned by f/w- %s", fmsg);
+ isp_prt(isp, ISP_LOGWARN, "CTIO returned by f/w- %s", fmsg);
break;
case CT_INVRXID:
@@ -1258,7 +1261,7 @@
* CTIO rejected by the firmware because an invalid RX_ID.
* Just print a message.
*/
- isp_prt(isp, ISP_LOGERR,
+ isp_prt(isp, ISP_LOGWARN,
"CTIO2 completed with Invalid RX_ID 0x%x", ct->ct_rxid);
break;
==== //depot/projects/newisp/dev/isp/isp_target.h#3 (text+ko) ====
@@ -409,8 +409,7 @@
*/
typedef struct {
isphdr_t ct_header;
- uint16_t ct_reserved;
-#define ct_syshandle ct_reserved /* we use this */
+ uint16_t ct_syshandle;
uint16_t ct_fwhandle; /* required by f/w */
uint8_t ct_lun; /* lun */
uint8_t ct_iid; /* initiator id */
@@ -513,8 +512,7 @@
#define MAXRESPLEN 26
typedef struct {
isphdr_t ct_header;
- uint16_t ct_reserved;
- uint16_t ct_fwhandle; /* just to match CTIO */
+ uint32_t ct_syshandle;
uint8_t ct_lun; /* lun */
uint8_t ct_iid; /* initiator id */
uint16_t ct_rxid; /* response ID */
@@ -572,8 +570,7 @@
typedef struct {
isphdr_t ct_header;
- uint16_t ct_reserved;
- uint16_t ct_fwhandle; /* just to match CTIO */
+ uint32_t ct_syshandle;
uint16_t ct_iid; /* initiator id */
uint16_t ct_rxid; /* response ID */
uint16_t ct_flags;
@@ -615,16 +612,17 @@
/*
* ct_flags values for CTIO2
*/
-#define CT2_FLAG_MMASK 0x0003
#define CT2_FLAG_MODE0 0x0000
#define CT2_FLAG_MODE1 0x0001
#define CT2_FLAG_MODE2 0x0002
-#define CT2_DATA_IN CT_DATA_IN
-#define CT2_DATA_OUT CT_DATA_OUT
-#define CT2_NO_DATA CT_NO_DATA
-#define CT2_DATAMASK CT_DATAMASK
+#define CT2_FLAG_MMASK 0x0003
+#define CT2_DATA_IN 0x0040
+#define CT2_DATA_OUT 0x0080
+#define CT2_NO_DATA 0x00C0
+#define CT2_DATAMASK 0x00C0
#define CT2_CCINCR 0x0100
#define CT2_FASTPOST 0x0200
+#define CT2_CONFIRM 0x2000
#define CT2_TERMINATE 0x4000
#define CT2_SENDSTATUS 0x8000
More information about the p4-projects
mailing list