1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-21 15:45:02 +00:00

Some ridiculous target mode botches- like having the wrong definitions

for messages. Some spelling fixes. Some target mode structure cleanups
to reflect reality.
This commit is contained in:
Matt Jacob 2003-09-13 01:58:26 +00:00
parent 5c1596a04a
commit 2f9e7606fe
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120016
2 changed files with 34 additions and 32 deletions

View File

@ -363,7 +363,7 @@ isp_target_put_entry(struct ispsoftc *isp, void *ap)
return (-1);
}
ISP_TDQE(isp, "isp_target_put_entry", (int) optr, ap);;
ISP_TDQE(isp, "isp_target_put_entry", (int) optr, ap);
ISP_ADD_REQUEST(isp, nxti);
return (0);
}
@ -539,6 +539,11 @@ isp_target_async(struct ispsoftc *isp, int bus, int event)
msg.nt_msg[0] = MSG_BUS_DEV_RESET;
(void) isp_async(isp, ISPASYNC_TARGET_MESSAGE, &msg);
break;
case ASYNC_CTIO_DONE:
evt.ev_bus = bus;
evt.ev_event = event;
(void) isp_async(isp, ISPASYNC_TARGET_EVENT, &evt);
return (0);
default:
isp_prt(isp, ISP_LOGERR,
"isp_target_async: unknown event 0x%x", event);
@ -611,14 +616,18 @@ isp_got_msg_fc(struct ispsoftc *isp, int bus, in_fcentry_t *inp)
msg.nt_tagval = inp->in_seqid;
msg.nt_lun = lun;
if (inp->in_task_flags & TASK_FLAGS_ABORT_TASK) {
isp_prt(isp, ISP_LOGINFO, f1, "ABORT TASK",
if (inp->in_task_flags & TASK_FLAGS_ABORT_TASK_SET) {
isp_prt(isp, ISP_LOGINFO, f1, "ABORT TASK SET",
inp->in_iid, lun, inp->in_seqid);
msg.nt_msg[0] = MSG_ABORT_TAG;
msg.nt_msg[0] = MSG_ABORT;
} else if (inp->in_task_flags & TASK_FLAGS_CLEAR_TASK_SET) {
isp_prt(isp, ISP_LOGINFO, f1, "CLEAR TASK SET",
inp->in_iid, lun, inp->in_seqid);
msg.nt_msg[0] = MSG_CLEAR_QUEUE;
} else if (inp->in_task_flags & TASK_FLAGS_LUN_RESET) {
isp_prt(isp, ISP_LOGINFO, f1, "LUN RESET",
inp->in_iid, lun, inp->in_seqid);
msg.nt_msg[0] = MSG_LUN_RESET;
} else if (inp->in_task_flags & TASK_FLAGS_TARGET_RESET) {
isp_prt(isp, ISP_LOGINFO, f1, "TARGET RESET",
inp->in_iid, lun, inp->in_seqid);
@ -626,12 +635,7 @@ isp_got_msg_fc(struct ispsoftc *isp, int bus, in_fcentry_t *inp)
} else if (inp->in_task_flags & TASK_FLAGS_CLEAR_ACA) {
isp_prt(isp, ISP_LOGINFO, f1, "CLEAR ACA",
inp->in_iid, lun, inp->in_seqid);
/* ???? */
msg.nt_msg[0] = MSG_REL_RECOVERY;
} else if (inp->in_task_flags & TASK_FLAGS_TERMINATE_TASK) {
isp_prt(isp, ISP_LOGINFO, f1, "TERMINATE TASK",
inp->in_iid, lun, inp->in_seqid);
msg.nt_msg[0] = MSG_TERM_IO_PROC;
} else {
isp_prt(isp, ISP_LOGWARN, f2, "task flag",
inp->in_status, lun, inp->in_iid,
@ -1091,7 +1095,7 @@ isp_handle_ctio2(struct ispsoftc *isp, ct2_entry_t *ct)
/*
* CTIO rejected by the firmware - invalid data direction.
*/
isp_prt(isp, ISP_LOGERR, "CTIO2 had wrong data directiond");
isp_prt(isp, ISP_LOGERR, "CTIO2 had wrong data direction");
break;
case CT_RSELTMO:

View File

@ -36,11 +36,8 @@
#ifndef _ISP_TARGET_H
#define _ISP_TARGET_H
/*
* Defines for all entry types
*/
#define QLTM_SENSELEN 18 /* non-FC cards only */
#define QLTM_SVALID 0x80
#define QLTM_SENSELEN 18
/*
* Structure for Enable Lun and Modify Lun queue entries
@ -141,28 +138,33 @@ typedef struct {
/*
* Values for the in_task_flags field- should only get one at a time!
*/
#define TASK_FLAGS_ABORT_TASK (1<<9)
#define TASK_FLAGS_CLEAR_TASK_SET (1<<10)
#define TASK_FLAGS_TARGET_RESET (1<<13)
#define TASK_FLAGS_CLEAR_ACA (1<<14)
#define TASK_FLAGS_TERMINATE_TASK (1<<15)
#define TASK_FLAGS_TARGET_RESET (1<<13)
#define TASK_FLAGS_LUN_RESET (1<<12)
#define TASK_FLAGS_CLEAR_TASK_SET (1<<10)
#define TASK_FLAGS_ABORT_TASK_SET (1<<9)
#ifndef MSG_ABORT
#define MSG_ABORT 0x06
#endif
#ifndef MSG_BUS_DEV_RESET
#define MSG_BUS_DEV_RESET 0x0c
#endif
#ifndef MSG_ABORT_TAG
#define MSG_ABORT_TAG 0x06
#define MSG_ABORT_TAG 0x0d
#endif
#ifndef MSG_CLEAR_QUEUE
#define MSG_CLEAR_QUEUE 0x0e
#endif
#ifndef MSG_BUS_DEV_RESET
#define MSG_BUS_DEV_RESET 0x0b
#endif
#ifndef MSG_REL_RECOVERY
#define MSG_REL_RECOVERY 0x10
#endif
#ifndef MSG_TERM_IO_PROC
#define MSG_TERM_IO_PROC 0x11
#endif
#ifndef MSG_LUN_RESET
#define MSG_LUN_RESET 0x17
#endif
/*
* Notify Acknowledge Entry structure
@ -274,7 +276,7 @@ typedef struct {
u_int16_t at_rxid; /* response ID */
u_int16_t at_flags;
u_int16_t at_status; /* firmware status */
u_int8_t at_reserved1;
u_int8_t at_crn; /* command reference number */
u_int8_t at_taskcodes;
u_int8_t at_taskflags;
u_int8_t at_execodes;
@ -296,6 +298,9 @@ typedef struct {
#define ATIO2_TC_ATTR_ACAQ 4
#define ATIO2_TC_ATTR_UNTAGGED 5
#define ATIO2_EX_WRITE 0x1
#define ATIO2_EX_READ 0x2
/*
* Continue Target I/O Entry structure
* Request from driver. The response from the
@ -461,14 +466,6 @@ typedef struct {
u_int32_t ct_datalen;
ispds_t ct_fcp_rsp_iudata;
} m2;
/*
* CTIO2 returned from F/W...
*/
struct {
u_int32_t _reserved[4];
u_int16_t ct_scsi_status;
u_int8_t ct_sense[QLTM_SENSELEN];
} fw;
} rsp;
} ct2_entry_t;
@ -485,6 +482,7 @@ typedef struct {
#define CT2_DATAMASK CT_DATAMASK
#define CT2_CCINCR 0x0100
#define CT2_FASTPOST 0x0200
#define CT2_TERMINATE 0x4000
#define CT2_SENDSTATUS 0x8000
/*