From f83d7679292bf0c56becaeb56d8fff81d2cec1c5 Mon Sep 17 00:00:00 2001 From: mjacob Date: Fri, 2 Jul 1999 22:31:11 +0000 Subject: [PATCH] Add in SNS and Fabric login/logout commands. Clean up ICBOPT defines. Remove INVALID_PDB_OPTIONS defines. Define generic SNS request and response structures and the bare minimum GAN and GP3 subcommands. --- sys/dev/isp/ispmbox.h | 71 +++++++++++++++++++++++++++++++------------ 1 file changed, 51 insertions(+), 20 deletions(-) diff --git a/sys/dev/isp/ispmbox.h b/sys/dev/isp/ispmbox.h index b8ec98490ee5..27a5f29e7eae 100644 --- a/sys/dev/isp/ispmbox.h +++ b/sys/dev/isp/ispmbox.h @@ -1,10 +1,10 @@ -/* $Id: ispmbox.h,v 1.9 1999/04/04 01:32:09 mjacob Exp $ */ -/* release_5_11_99 */ +/* $Id: ispmbox.h,v 1.10 1999/05/11 05:00:35 mjacob Exp $ */ +/* release_6_2_99 */ /* * Mailbox and Queue Entry Definitions for for Qlogic ISP SCSI adapters. * *--------------------------------------- - * Copyright (c) 1997, 1998 by Matthew Jacob + * Copyright (c) 1997, 1998, 1999 by Matthew Jacob * NASA/Ames Research Center * All rights reserved. *--------------------------------------- @@ -130,6 +130,10 @@ #define MBOX_GET_PORT_NAME 0x6a #define MBOX_GET_LINK_STATUS 0x6b #define MBOX_INIT_LIP_RESET 0x6c +#define MBOX_SEND_SNS 0x6e +#define MBOX_FABRIC_LOGIN 0x6f +#define MBOX_SEND_CHANGE_REQUEST 0x70 +#define MBOX_FABRIC_LOGOUT 0x71 #define MBOX_INIT_LIP_LOGIN 0x72 #define ISP2100_SET_PCI_PARAM 0x00ff @@ -460,26 +464,31 @@ typedef struct { } isp_icb_t; #define ICB_VERSION1 1 -#define ICBOPT_HARD_ADDRESS (1<<0) -#define ICBOPT_FAIRNESS (1<<1) -#define ICBOPT_FULL_DUPLEX (1<<2) -#define ICBOPT_FAST_POST (1<<3) -#define ICBOPT_TGT_ENABLE (1<<4) -#define ICBOPT_INI_DISABLE (1<<5) -#define ICBOPT_INI_ADISC (1<<6) -#define ICBOPT_INI_TGTTYPE (1<<7) -#define ICBOPT_PDBCHANGE_AE (1<<8) -#define ICBOPT_NOLIP (1<<9) -#define ICBOPT_SRCHDOWN (1<<10) -#define ICBOPT_PREVLOOP (1<<11) -#define ICBOPT_STOP_ON_QFULL (1<<12) -#define ICBOPT_FULL_LOGIN (1<<13) -#define ICBOPT_USE_PORTNAME (1<<14) +#define ICBOPT_HARD_ADDRESS 0x0001 +#define ICBOPT_FAIRNESS 0x0002 +#define ICBOPT_FULL_DUPLEX 0x0004 +#define ICBOPT_FAST_POST 0x0008 +#define ICBOPT_TGT_ENABLE 0x0010 +#define ICBOPT_INI_DISABLE 0x0020 +#define ICBOPT_INI_ADISC 0x0040 +#define ICBOPT_INI_TGTTYPE 0x0080 +#define ICBOPT_PDBCHANGE_AE 0x0100 +#define ICBOPT_NOLIP 0x0200 +#define ICBOPT_SRCHDOWN 0x0400 +#define ICBOPT_PREVLOOP 0x0800 +#define ICBOPT_STOP_ON_QFULL 0x1000 +#define ICBOPT_FULL_LOGIN 0x2000 +#define ICBOPT_USE_PORTNAME 0x4000 #define ICB_MIN_FRMLEN 256 #define ICB_MAX_FRMLEN 2112 #define ICB_DFLT_FRMLEN 1024 +#define ICB_DFLT_ALLOC 256 +#define ICB_DFLT_THROTTLE 16 +#define ICB_DFLT_RDELAY 5 +#define ICB_DFLT_RCOUNT 3 + #define RQRSP_ADDR0015 0 #define RQRSP_ADDR1631 1 @@ -552,8 +561,6 @@ typedef struct { u_int16_t pdb_sl_ptr; } isp_pdb_t; -#define INVALID_PDB_OPTIONS 0xDEAD - #define PDB_OPTIONS_XMITTING (1<<11) #define PDB_OPTIONS_LNKXMIT (1<<10) #define PDB_OPTIONS_ABORTED (1<<9) @@ -575,6 +582,30 @@ typedef struct { #define SVC3_TGT_ROLE 0x10 #define SVC3_INI_ROLE 0x20 #define SVC3_ROLE_MASK 0x30 +#define SVC3_ROLE_SHIFT 4 + +#define SNS_GAN 0x100 +#define SNS_GP3 0x171 +typedef struct { + u_int16_t snscb_rblen; /* response buffer length (words) */ + u_int16_t snscb_res0; + u_int16_t snscb_addr[4]; /* response buffer address */ + u_int16_t snscb_sblen; /* subcommand buffer length (words) */ + u_int16_t snscb_res1; + u_int16_t snscb_data[1]; /* variable data */ +} sns_screq_t; /* Subcommand Request Structure */ +#define SNS_GAN_REQ_SIZE (sizeof (sns_screq_t)+(5*(sizeof (u_int16_t)))) +#define SNS_GP3_REQ_SIZE (sizeof (sns_screq_t)+(5*(sizeof (u_int16_t)))) + +typedef struct { + u_int8_t snscb_cthdr[16]; + u_int8_t snscb_port_type; + u_int8_t snscb_port_id[3]; + u_int8_t snscb_portname[8]; + u_int16_t snscb_data[1]; /* variable data */ +} sns_scrsp_t; /* Subcommand Response Structure */ +#define SNS_GAN_RESP_SIZE 608 /* Maximum response size (bytes) */ +#define SNS_GP3_RESP_SIZE 532 /* XXX: For 128 ports */ /* * Target Mode Structures