From owner-freebsd-scsi Fri Mar 30 11:22: 5 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id 35D0737B71A for ; Fri, 30 Mar 2001 11:22:00 -0800 (PST) (envelope-from mjacob@feral.com) Received: from zeppo.feral.com (IDENT:mjacob@zeppo [192.67.166.71]) by feral.com (8.9.3/8.9.3) with ESMTP id LAA18944 for ; Fri, 30 Mar 2001 11:22:05 -0800 Date: Fri, 30 Mar 2001 11:21:59 -0800 (PST) From: Matthew Jacob Reply-To: mjacob@feral.com To: scsi@freebsd.org Subject: proposed beginning of changes to CAM_NEW_TRAN_CODE for XPORT_FC Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Just a start at getting XPORT_FC up and going.... I want to start embedding WWPN/WWNNs in the path inquiry code and get them up to be visible to scsi_da because I want scsi_da to do a make_dev_alias using the WWPN. -matt Index: cam_ccb.h =================================================================== RCS file: /home/ncvs/src/sys/cam/cam_ccb.h,v retrieving revision 1.20 diff -u -r1.20 cam_ccb.h --- cam_ccb.h 2001/03/27 05:45:09 1.20 +++ cam_ccb.h 2001/03/30 19:17:43 @@ -521,6 +521,12 @@ struct ccb_pathinq_settings_spi { u_int8_t ppr_options; }; +struct ccb_pathinq_settings_fc { + u_int64_t wwnn; /* world wide node name */ + u_int64_t wwpn; /* world wide port name */ + u_int32_t port; /* 24 port id, if known */ + u_int32_t bitrate; /* Mbps */ +}; #endif /* CAM_NEW_TRAN_CODE */ struct ccb_pathinq { Index: cam_xpt.c =================================================================== RCS file: /home/ncvs/src/sys/cam/cam_xpt.c,v retrieving revision 1.110 diff -u -r1.110 cam_xpt.c --- cam_xpt.c 2001/03/27 05:45:09 1.110 +++ cam_xpt.c 2001/03/30 19:17:46 @@ -1535,6 +1535,14 @@ if ((spi->valid & CTS_SPI_VALID_BUS_WIDTH) != 0) speed *= (0x01 << spi->bus_width); } + if (cts.ccb_h.status == CAM_REQ_CMP + && cts.transport == XPORT_FC) { + struct ccb_trans_settings_fc *fc; + + fc = &cts.xport_specific.fc; + speed = fc->bitrate; + } + mb = speed / 1000; if (mb > 0) @@ -1568,6 +1576,18 @@ } else if (freq != 0) { printf(")"); } + } + if (cts.ccb_h.status == CAM_REQ_CMP + && cts.transport == XPORT_FC) { + struct ccb_trans_settings_fc *fc; + + fc = &cts.xport_specific.fc; + if (fc->wwnn) + printf(" WWNN %q", (quad_t) fc->wwnn); + if (fc->wwpn) + printf(" WWPN %q", (quad_t) fc->wwpn); + if (fc->port) + printf(" PortID %u", fc->port); } if (path->device->inq_flags & SID_CmdQue To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message