From 126ec86486d4ed90e89f9aa760fdfc3d8a21ada3 Mon Sep 17 00:00:00 2001 From: Matt Jacob Date: Fri, 31 Aug 2001 21:39:04 +0000 Subject: Add 2 Gigabit Fibre Channel support (2300 && 2312 cards). This required some reworking (and consequent cleanup) of the interrupt service code. Also begin to start a cleanup of target mode support that will (eventually) not require more inforamtion routed with the ATIO to come back with the CTIO other than tag. MFC after: 4 weeks --- sys/dev/isp/ispmbox.h | 45 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) (limited to 'sys/dev/isp/ispmbox.h') diff --git a/sys/dev/isp/ispmbox.h b/sys/dev/isp/ispmbox.h index a69a272e79066..5c4b632bc933a 100644 --- a/sys/dev/isp/ispmbox.h +++ b/sys/dev/isp/ispmbox.h @@ -219,16 +219,16 @@ typedef struct { */ #define WRITE_REQUEST_QUEUE_IN_POINTER(isp, value) \ - ISP_WRITE(isp, INMAILBOX4, value) + ISP_WRITE(isp, isp->isp_rqstinrp, value) -#define READ_REQUEST_QUEUE_OUT_POINTER(isp) \ - ISP_READ(isp, OUTMAILBOX4) +#define READ_REQUEST_QUEUE_OUT_POINTER(isp) \ + ISP_READ(isp, isp->isp_rqstoutrp) -#define WRITE_RESPONSE_QUEUE_IN_POINTER(isp, value) \ - ISP_WRITE(isp, INMAILBOX5, value) +#define READ_RESPONSE_QUEUE_IN_POINTER(isp) \ + ISP_READ(isp, isp->isp_respinrp) -#define READ_RESPONSE_QUEUE_OUT_POINTER(isp) \ - ISP_READ(isp, OUTMAILBOX5) +#define WRITE_RESPONSE_QUEUE_OUT_POINTER(isp, value) \ + ISP_WRITE(isp, isp->isp_respoutrp, value) /* * Command Structure Definitions @@ -240,7 +240,8 @@ typedef struct { } ispds_t; typedef struct { - u_int64_t ds_base; + u_int32_t ds_base; + u_int32_t ds_basehi; u_int32_t ds_count; } ispds64_t; @@ -353,7 +354,7 @@ typedef struct { #define ISP_SBUSIFY_ISPREQ(a, b) #endif -#define ISP_RQDSEG_T2 3 +#define ISP_RQDSEG_T2 3 typedef struct { isphdr_t req_header; u_int32_t req_handle; @@ -369,6 +370,22 @@ typedef struct { ispds_t req_dataseg[ISP_RQDSEG_T2]; } ispreqt2_t; +#define ISP_RQDSEG_T3 2 +typedef struct { + isphdr_t req_header; + u_int32_t req_handle; + u_int8_t req_lun_trn; + u_int8_t req_target; + u_int16_t req_scclun; + u_int16_t req_flags; + u_int16_t _res2; + u_int16_t req_time; + u_int16_t req_seg_count; + u_int32_t req_cdb[4]; + u_int32_t req_totalcnt; + ispds64_t req_dataseg[ISP_RQDSEG_T3]; +} ispreqt3_t; + /* req_flag values */ #define REQFLAG_NODISCON 0x0001 #define REQFLAG_HTAG 0x0002 @@ -410,6 +427,12 @@ typedef struct { ispds_t req_dataseg[ISP_CDSEG]; } ispcontreq_t; +#define ISP_CDSEG64 5 +typedef struct { + isphdr_t req_header; + ispds64_t req_dataseg[ISP_CDSEG64]; +} ispcontreq64_t; + typedef struct { isphdr_t req_header; u_int32_t req_handle; @@ -630,6 +653,10 @@ typedef struct isp_icb { #define ICBXOPT_RIO_16BIT_DELAY 3 #define ICBXOPT_RIO_32BIT_DELAY 4 +/* These 3 only apply to the 2300 */ +#define ICBXOPT_RATE_ONEGB (0 << 14) +#define ICBXOPT_RATE_TWOGB (1 << 14) +#define ICBXOPT_RATE_AUTO (2 << 14) #define ICB_MIN_FRMLEN 256 -- cgit v1.3