From owner-p4-projects@FreeBSD.ORG Sat May 5 05:11:16 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AB80816A403; Sat, 5 May 2007 05:11:16 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 64BD016A401 for ; Sat, 5 May 2007 05:11:16 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 549AD13C457 for ; Sat, 5 May 2007 05:11:16 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l455BG13098603 for ; Sat, 5 May 2007 05:11:16 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l455BGm8098600 for perforce@freebsd.org; Sat, 5 May 2007 05:11:16 GMT (envelope-from mjacob@freebsd.org) Date: Sat, 5 May 2007 05:11:16 GMT Message-Id: <200705050511.l455BGm8098600@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 119265 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2007 05:11:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=119265 Change 119265 by mjacob@mjexp on 2007/05/05 05:10:51 Add a GETDLIST operation (to get visible WWNs) Affected files ... .. //depot/projects/mjexp/sys/dev/isp/isp_tpublic.h#6 edit Differences ... ==== //depot/projects/mjexp/sys/dev/isp/isp_tpublic.h#6 (text+ko) ==== @@ -54,6 +54,7 @@ QIN_HBA_REG=99, /* the argument is a pointer to a hba_register_t */ QIN_GETINFO, /* the argument is a pointer to a info_t */ QIN_SETINFO, /* the argument is a pointer to a info_t */ + QIN_GETDLIST, /* the argument is a pointer to a fc_dlist_t */ QIN_ENABLE, /* the argument is a pointer to a enadis_t */ QIN_DISABLE, /* the argument is a pointer to a enadis_t */ QIN_TMD_CONT, /* the argument is a pointer to a tmd_cmd_t */ @@ -72,7 +73,7 @@ * in, and the external module to call back with a QIN_HBA_REG that * passes back the corresponding information. */ -#define QR_VERSION 15 +#define QR_VERSION 16 typedef struct { /* NB: tags from here to r_version must never change */ void * r_identity; @@ -87,8 +88,7 @@ } hba_register_t; /* - * An information structure that is used to get or set per-channel - * transport layer parameters. + * An information structure that is used to get or set per-channel transport layer parameters. */ typedef struct { void * i_identity; @@ -109,6 +109,16 @@ } info_t; /* + * An information structure to return a list of logged in WWPNs. FC specific. + */ +typedef struct { + void * d_identity; + int d_channel; + int d_error; + int d_count; + uint64_t * d_wwpns; +} fc_dlist_t; +/* * Notify structure */ typedef enum { @@ -324,12 +334,14 @@ #define L0LUN_TO_FLATLUN(lptr) ((((lptr)[0] & 0x3f) << 8) | ((lptr)[1])) #define FLATLUN_TO_L0LUN(lptr, lun) \ - (lptr)[1] = lun; \ + (lptr)[1] = lun & 0xff; \ if (sizeof (lun) == 1) { \ (lptr)[0] = 0; \ } else { \ - int nl = (lun); \ - if (nl < 256) { \ + uint16_t nl = lun; \ + if (nl == LUN_ANY) { \ + (lptr)[0] = (nl >> 8) & 0xff; \ + } else if (nl < 256) { \ (lptr)[0] = 0; \ } else { \ (lptr)[0] = 0x40 | ((nl >> 8) & 0x3f); \