Date: Fri, 30 Mar 2001 11:26:56 -0800 (PST) From: Matthew Jacob <mjacob@feral.com> To: scsi@FreeBSD.ORG Subject: take 2:beginning of changes to CAM_NEW_TRAN_CODE for XPORT_FC Message-ID: <Pine.LNX.4.21.0103301126260.26846-100000@zeppo.feral.com> In-Reply-To: <Pine.LNX.4.21.0103301119570.26846-100000@zeppo.feral.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 30 Mar 2001, Matthew Jacob wrote:
>
> 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:25:12
@@ -521,6 +521,13 @@
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 */
+};
+#define PATHINQ_SETTINGS_SIZE 128
#endif /* CAM_NEW_TRAN_CODE */
struct ccb_pathinq {
@@ -550,6 +557,8 @@
u_int transport_version;
union {
struct ccb_pathinq_settings_spi spi;
+ struct ccb_pathinq_settings_fc fc;
+ char ccb_pathinq_settings_opaque[PATHINQ_SETTINGS_SIZE];
} xport_specific;
#endif /* CAM_NEW_TRAN_CODE */
};
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:25:15
@@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.21.0103301126260.26846-100000>
