Date: Mon, 16 May 2016 18:11:53 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r299961 - stable/10/sys/cam/scsi Message-ID: <201605161811.u4GIBrib081627@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Mon May 16 18:11:53 2016 New Revision: 299961 URL: https://svnweb.freebsd.org/changeset/base/299961 Log: MFC 298212 Add the ability to read a SAS device's Target Port NAA designator sys/cam/scsi/scsi_all.h sys/cam/scsi/scsi_all.c Add the scsi_devid_is_port_naa helper function Modified: stable/10/sys/cam/scsi/scsi_all.c stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.c Mon May 16 17:41:25 2016 (r299960) +++ stable/10/sys/cam/scsi/scsi_all.c Mon May 16 18:11:53 2016 (r299961) @@ -5626,6 +5626,19 @@ scsi_devid_is_lun_name(uint8_t *bufp) return 1; } +int +scsi_devid_is_port_naa(uint8_t *bufp) +{ + struct scsi_vpd_id_descriptor *descr; + + descr = (struct scsi_vpd_id_descriptor *)bufp; + if ((descr->id_type & SVPD_ID_ASSOC_MASK) != SVPD_ID_ASSOC_PORT) + return 0; + if ((descr->id_type & SVPD_ID_TYPE_MASK) != SVPD_ID_TYPE_NAA) + return 0; + return 1; +} + struct scsi_vpd_id_descriptor * scsi_get_devid_desc(struct scsi_vpd_id_descriptor *desc, uint32_t len, scsi_devid_checkfn_t ck_fn) Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Mon May 16 17:41:25 2016 (r299960) +++ stable/10/sys/cam/scsi/scsi_all.h Mon May 16 18:11:53 2016 (r299961) @@ -3659,6 +3659,7 @@ int scsi_devid_is_lun_eui64(uint8_t *bu int scsi_devid_is_lun_naa(uint8_t *bufp); int scsi_devid_is_lun_name(uint8_t *bufp); int scsi_devid_is_lun_t10(uint8_t *bufp); +int scsi_devid_is_port_naa(uint8_t *bufp); struct scsi_vpd_id_descriptor * scsi_get_devid(struct scsi_vpd_device_id *id, uint32_t len, scsi_devid_checkfn_t ck_fn);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605161811.u4GIBrib081627>