Some minor tweaklets.
This commit is contained in:
parent
05914a3f9d
commit
9dae880716
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=59453
@ -672,6 +672,8 @@ isp_notify_ack(isp, arg)
|
|||||||
} else {
|
} else {
|
||||||
na->na_flags = NAFC_RST_CLRD;
|
na->na_flags = NAFC_RST_CLRD;
|
||||||
}
|
}
|
||||||
|
na->na_header.rqs_entry_type = RQSTYPE_NOTIFY_ACK;
|
||||||
|
na->na_header.rqs_entry_count = 1;
|
||||||
ISP_SWIZ_NOT_ACK_FC(isp, outp, na);
|
ISP_SWIZ_NOT_ACK_FC(isp, outp, na);
|
||||||
} else {
|
} else {
|
||||||
na_entry_t *na = (na_entry_t *) storage;
|
na_entry_t *na = (na_entry_t *) storage;
|
||||||
@ -683,11 +685,13 @@ isp_notify_ack(isp, arg)
|
|||||||
na->na_tgt = inp->in_tgt;
|
na->na_tgt = inp->in_tgt;
|
||||||
na->na_seqid = inp->in_seqid;
|
na->na_seqid = inp->in_seqid;
|
||||||
if (inp->in_status == IN_RESET) {
|
if (inp->in_status == IN_RESET) {
|
||||||
na->na_flags = NA_RST_CLRD;
|
na->na_event = NA_RST_CLRD;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
na->na_flags = NA_RST_CLRD;
|
na->na_event = NA_RST_CLRD;
|
||||||
}
|
}
|
||||||
|
na->na_header.rqs_entry_type = RQSTYPE_NOTIFY_ACK;
|
||||||
|
na->na_header.rqs_entry_count = 1;
|
||||||
ISP_SWIZ_NOT_ACK(isp, outp, na);
|
ISP_SWIZ_NOT_ACK(isp, outp, na);
|
||||||
}
|
}
|
||||||
ISP_TDQE(isp, "isp_notify_ack", (int) optr, storage);
|
ISP_TDQE(isp, "isp_notify_ack", (int) optr, storage);
|
||||||
@ -892,12 +896,14 @@ isp_handle_ctio(isp, ct)
|
|||||||
* We sent status & command complete.
|
* We sent status & command complete.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ((ct->ct_flags & CT_DATAMASK) == CT_NO_DATA) {
|
if (ct->ct_flags & CT_SENDSTATUS) {
|
||||||
|
break;
|
||||||
|
} else if ((ct->ct_flags & CT_DATAMASK) == CT_NO_DATA) {
|
||||||
/*
|
/*
|
||||||
* Nothing to do in this case.
|
* Nothing to do in this case.
|
||||||
*/
|
*/
|
||||||
IDPRINTF(pl, ("%s: CTIO- initiator disconnected OK\n",
|
IDPRINTF(pl, ("%s:CTIO- iid %d disconnected OK\n",
|
||||||
isp->isp_name));
|
isp->isp_name, ct->ct_iid));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1025,7 +1031,7 @@ isp_handle_ctio(isp, ct)
|
|||||||
* complete thread synchronization.
|
* complete thread synchronization.
|
||||||
*/
|
*/
|
||||||
IDPRINTF(pl,
|
IDPRINTF(pl,
|
||||||
("%s: status CTIO complete\n", isp->isp_name));
|
("%s:status CTIO complete\n", isp->isp_name));
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Final CTIO completed. Release DMA resources and
|
* Final CTIO completed. Release DMA resources and
|
||||||
|
@ -186,6 +186,8 @@ typedef struct {
|
|||||||
* Value for the na_event field
|
* Value for the na_event field
|
||||||
*/
|
*/
|
||||||
#define NA_RST_CLRD 0x80 /* Clear an async event notification */
|
#define NA_RST_CLRD 0x80 /* Clear an async event notification */
|
||||||
|
#define NA_OK 0x01 /* Notify Acknowledge Succeeded */
|
||||||
|
#define NA_INVALID 0x06 /* Invalid Notify Acknowledge */
|
||||||
|
|
||||||
#define NA2_RSVDLEN 21
|
#define NA2_RSVDLEN 21
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -623,7 +625,7 @@ int isp_target_notify __P((struct ispsoftc *, void *, u_int16_t *));
|
|||||||
*/
|
*/
|
||||||
#define DFLT_CMD_CNT (RESULT_QUEUE_LEN >> 1)
|
#define DFLT_CMD_CNT (RESULT_QUEUE_LEN >> 1)
|
||||||
#define DFLT_INOTIFY (4)
|
#define DFLT_INOTIFY (4)
|
||||||
int isp_lun_cmd __P((struct ispsoftc *isp, int, int, int, int, u_int32_t));
|
int isp_lun_cmd __P((struct ispsoftc *, int, int, int, int, u_int32_t));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* General request queue 'put' routine for target mode entries.
|
* General request queue 'put' routine for target mode entries.
|
||||||
@ -635,14 +637,14 @@ int isp_target_put_entry __P((struct ispsoftc *isp, void *));
|
|||||||
* used for replenishing f/w resource counts.
|
* used for replenishing f/w resource counts.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
isp_target_put_atio __P((struct ispsoftc *isp, int, int, int, int, int));
|
isp_target_put_atio __P((struct ispsoftc *, int, int, int, int, int));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* General routine to send a final CTIO for a command- used mostly for
|
* General routine to send a final CTIO for a command- used mostly for
|
||||||
* local responses.
|
* local responses.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
isp_endcmd __P((struct ispsoftc *isp, void *, u_int32_t, u_int32_t));
|
isp_endcmd __P((struct ispsoftc *, void *, u_int32_t, u_int32_t));
|
||||||
#define ECMD_SVALID 0x100
|
#define ECMD_SVALID 0x100
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -59,11 +59,26 @@ typedef struct {
|
|||||||
} tmd_event_t;
|
} tmd_event_t;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Suggested software target mode command handling structure.
|
* Suggested Software Target Mode Command Handling structure.
|
||||||
*
|
*
|
||||||
* The command structure is one suggested possible MD command structure,
|
* A note about terminology:
|
||||||
* but since the handling of thbis is entirely in the MD layer, there
|
*
|
||||||
* is no requirement that it be used.
|
* MD stands for "Machine Dependent".
|
||||||
|
*
|
||||||
|
* This driver is structured in three layers: Outer MD, core, and inner MD.
|
||||||
|
* The latter also is bus dependent (i.e., is cognizant of PCI bus issues
|
||||||
|
* as well as platform issues).
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* "Outer Layer" means "Other Module"
|
||||||
|
*
|
||||||
|
* Some additional module that actually implements SCSI target command
|
||||||
|
* policy is the recipient of incoming commands and the source of the
|
||||||
|
* disposition for them.
|
||||||
|
*
|
||||||
|
* The command structure below is one suggested possible MD command structure,
|
||||||
|
* but since the handling of thbis is entirely in the MD layer, there is
|
||||||
|
* no explicit or implicit requirement that it be used.
|
||||||
*
|
*
|
||||||
* The cd_private tag should be used by the MD layer to keep a free list
|
* The cd_private tag should be used by the MD layer to keep a free list
|
||||||
* of these structures. Code outside of this driver can then use this
|
* of these structures. Code outside of this driver can then use this
|
||||||
@ -123,17 +138,16 @@ typedef struct {
|
|||||||
* layers must agree on the meaning of cd_data.
|
* layers must agree on the meaning of cd_data.
|
||||||
*
|
*
|
||||||
* The tag cd_totlen is the total data amount expected to be moved
|
* The tag cd_totlen is the total data amount expected to be moved
|
||||||
* over the life of the command. It may be set by the MD layer,
|
* over the life of the command. It *may* be set by the MD layer, possibly
|
||||||
* for example, from the datalen field of an FCP CMND IU unit. If
|
* from the datalen field of an FCP CMND IU unit. If it shows up in the outer
|
||||||
* it shows up in the outer layers set to zero and the CDB indicates
|
* layers set to zero and the CDB indicates data should be moved, the outer
|
||||||
* data should be moved, the outer layer should set it to the amount
|
* layer should set it to the amount expected to be moved.
|
||||||
* expected to be moved.
|
|
||||||
*
|
*
|
||||||
* The tag cd_resid should be the total residual of data not transferred.
|
* The tag cd_resid should be the total residual of data not transferred.
|
||||||
* The outer layers need to set this at the begining of command processing
|
* The outer layers need to set this at the begining of command processing
|
||||||
* to equal cd_totlen. As data is successfully moved, this value is decreased.
|
* to equal cd_totlen. As data is successfully moved, this value is decreased.
|
||||||
* At the end of a command, any nonzero residual indicates the number of bytes
|
* At the end of a command, any nonzero residual indicates the number of bytes
|
||||||
* requested but not moved.
|
* requested but not moved. XXXXXXXXXXXXXXXXXXXXXXX TOO VAGUE!!!
|
||||||
*
|
*
|
||||||
* The tag cd_xfrlen is the length of the currently active data transfer.
|
* The tag cd_xfrlen is the length of the currently active data transfer.
|
||||||
* This allows several interations between any outside software and the
|
* This allows several interations between any outside software and the
|
||||||
@ -206,9 +220,10 @@ typedef struct tmd_cmd {
|
|||||||
} tmd_cmd_t;
|
} tmd_cmd_t;
|
||||||
|
|
||||||
#define CDFL_BUSY 0x01 /* this command is not on a free list */
|
#define CDFL_BUSY 0x01 /* this command is not on a free list */
|
||||||
#define CDFL_NODISC 0x02 /* disconnect not allowed */
|
#define CDFL_NODISC 0x02 /* disconnects disabled */
|
||||||
#define CDFL_SENTSENSE 0x04 /* last action sent sense data */
|
#define CDFL_SENTSENSE 0x04 /* last action sent sense data */
|
||||||
#define CDFL_ERROR 0x08 /* last action ended in error */
|
#define CDFL_SENTSTATUS 0x08 /* last action sent status */
|
||||||
|
#define CDFL_ERROR 0x10 /* last action ended in error */
|
||||||
#define CDFL_PRIVATE_0 0x80 /* private layer flags */
|
#define CDFL_PRIVATE_0 0x80 /* private layer flags */
|
||||||
|
|
||||||
#define CDFH_SNSVALID 0x01 /* sense data valid */
|
#define CDFH_SNSVALID 0x01 /* sense data valid */
|
||||||
|
Loading…
Reference in New Issue
Block a user