aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/isp/isp_inline.h
diff options
context:
space:
mode:
authorMatt Jacob <mjacob@FreeBSD.org>2002-01-03 20:43:22 +0000
committerMatt Jacob <mjacob@FreeBSD.org>2002-01-03 20:43:22 +0000
commit2903b27203209c8b6e46bd877b6fc7c9b28a81ea (patch)
tree432d531bd42c741928abf5d6937ced643130d219 /sys/dev/isp/isp_inline.h
parent7855d28a287dc0aee3f85df9eb5d5a9197ab2391 (diff)
downloadsrc-2903b27203209c8b6e46bd877b6fc7c9b28a81ea.tar.gz
src-2903b27203209c8b6e46bd877b6fc7c9b28a81ea.zip
Implement REDUCED INTERRUPT OPERATION usage form FC cards- this allows the
firmware to delay completion of commands so that it can attempt to batch a bunch of completions at once- either returning 16 bit handles in mailbox registers, or in a resposne queue entry that has a whole wad of 16 bit handles. Distinguish between 2300 and 2312 chipsets- if only because the revisions on the chips have different meanings. Add more instrumentation plus ISP_GET_STATS and ISP_CLR_STATS ioctls. Run up the maximum number of response queue entities we'll look at per interrupt. If we haven't set HBA role yet, always return success from isp_fc_runstate. MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=88855
Diffstat (limited to 'sys/dev/isp/isp_inline.h')
-rw-r--r--sys/dev/isp/isp_inline.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/sys/dev/isp/isp_inline.h b/sys/dev/isp/isp_inline.h
index 0bb42d96230c..bc61e7818ad5 100644
--- a/sys/dev/isp/isp_inline.h
+++ b/sys/dev/isp/isp_inline.h
@@ -209,7 +209,7 @@ isp_fc_runstate(struct ispsoftc *isp, int tval)
fcparam *fcp;
int *tptr;
- if (IS_SCSI(isp))
+ if (IS_SCSI(isp) || isp->isp_role == ISP_ROLE_NONE)
return (0);
tptr = tval? &tval : NULL;
@@ -269,6 +269,8 @@ isp_get_response(struct ispsoftc *, ispstatusreq_t *, ispstatusreq_t *);
static INLINE void
isp_get_response_x(struct ispsoftc *, ispstatus_cont_t *, ispstatus_cont_t *);
static INLINE void
+isp_get_rio2(struct ispsoftc *, isp_rio2_t *, isp_rio2_t *);
+static INLINE void
isp_put_icb(struct ispsoftc *, isp_icb_t *, isp_icb_t *);
static INLINE void
isp_get_pdb(struct ispsoftc *, isp_pdb_t *, isp_pdb_t *);
@@ -556,6 +558,22 @@ isp_get_response_x(struct ispsoftc *isp, ispstatus_cont_t *cpsrc,
}
static INLINE void
+isp_get_rio2(struct ispsoftc *isp, isp_rio2_t *r2src, isp_rio2_t *r2dst)
+{
+ int i;
+ isp_copy_in_hdr(isp, &r2src->req_header, &r2dst->req_header);
+ if (r2dst->req_header.rqs_seqno > 30)
+ r2dst->req_header.rqs_seqno = 30;
+ for (i = 0; i < r2dst->req_header.rqs_seqno; i++) {
+ ISP_IOXGET_16(isp, &r2src->req_handles[i],
+ r2dst->req_handles[i]);
+ }
+ while (i < 30) {
+ r2dst->req_handles[i++] = 0;
+ }
+}
+
+static INLINE void
isp_put_icb(struct ispsoftc *isp, isp_icb_t *Is, isp_icb_t *Id)
{
int i;