From e52652370759dcf5500b7b9828e62f080ec77759 Mon Sep 17 00:00:00 2001 From: Matt Jacob Date: Mon, 23 Jan 2006 06:23:37 +0000 Subject: First of several commits as this driver is dusted off and maybe brought up to date. Principle changes for this reelase is to support 2K Port Login firmware. This allows us to support the 2322 (and 2422 4Gb) cards which only come with the 2K Port Login firmware. The 2322 should now work- but we don't have firmware sets for it in ispfw (as the change to load 2K Port Login f/w hasn't been made- that f/w is so big it has to be loaded in more than one chunk). Other changes are the beginnings of cleaning up some long standing target mode issues. The next changes here will incorporate a lot of bug fixes from others. Finally, some copyright cleanup and attempts to make the parts of the driver that are FreeBSD specific start conforming more to FreeBSD style. MFC after: 1 month --- sys/dev/isp/ispmbox.h | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) (limited to 'sys/dev/isp/ispmbox.h') diff --git a/sys/dev/isp/ispmbox.h b/sys/dev/isp/ispmbox.h index b810faaa6344..a7f5b90d91c1 100644 --- a/sys/dev/isp/ispmbox.h +++ b/sys/dev/isp/ispmbox.h @@ -2,7 +2,7 @@ /*- * Mailbox and Queue Entry Definitions for for Qlogic ISP SCSI adapters. * - * Copyright (c) 1997, 1998, 1999, 2000 by Matthew Jacob + * Copyright (c) 1997-2006 by Matthew Jacob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -160,10 +160,6 @@ #define MBOX_BUSY 0x04 -typedef struct { - u_int16_t param[8]; -} mbreg_t; - /* * Mailbox Command Complete Status Codes */ @@ -351,6 +347,7 @@ typedef struct { #define SYNC_DEVICE 0 #define SYNC_TARGET 1 #define SYNC_ALL 2 +#define SYNC_LIP 3 #define ISP_RQDSEG_T2 3 typedef struct { @@ -368,6 +365,20 @@ typedef struct { ispds_t req_dataseg[ISP_RQDSEG_T2]; } ispreqt2_t; +typedef struct { + isphdr_t req_header; + u_int32_t req_handle; + u_int16_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_int8_t req_cdb[16]; + u_int32_t req_totalcnt; + ispds_t req_dataseg[ISP_RQDSEG_T2]; +} ispreqt2e_t; + #define ISP_RQDSEG_T3 2 typedef struct { isphdr_t req_header; @@ -384,6 +395,20 @@ typedef struct { ispds64_t req_dataseg[ISP_RQDSEG_T3]; } ispreqt3_t; +typedef struct { + isphdr_t req_header; + u_int32_t req_handle; + u_int16_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_int8_t req_cdb[16]; + u_int32_t req_totalcnt; + ispds64_t req_dataseg[ISP_RQDSEG_T3]; +} ispreqt3e_t; + /* req_flag values */ #define REQFLAG_NODISCON 0x0001 #define REQFLAG_HTAG 0x0002 @@ -569,6 +594,12 @@ typedef struct { #define ISP_FW_ATTR_CLASS2 0x08 #define ISP_FW_ATTR_FCTAPE 0x10 #define ISP_FW_ATTR_IP 0x20 +#define ISP_FW_ATTR_VI 0x40 +#define ISP_FW_ATTR_VI_SOLARIS 0x80 +#define ISP_FW_ATTR_2KLOGINS 0x100 /* XXX: just a guess */ + +#define IS_2KLOGIN(isp) \ + (IS_FC(isp) && (FCPARAM(isp)->isp_fwattr & ISP_FW_ATTR_2KLOGINS)) /* * Reduced Interrupt Operation Response Queue Entreis -- cgit v1.3