Date: Wed, 12 Jun 2013 21:41:09 +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-9@freebsd.org Subject: svn commit: r251669 - stable/9/sbin/camcontrol Message-ID: <201306122141.r5CLf9ql063863@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Wed Jun 12 21:41:09 2013 New Revision: 251669 URL: http://svnweb.freebsd.org/changeset/base/251669 Log: MFC r250662 sbin/camcontrol/camcontrol.c If an expander returns 0x00 (no device attached) in the ATTACHED DEVICE field of the SMP DISCOVER response, ignore the value of ATTACHED SAS ADDRESS, because it is invalid. Some expanders zero out the address when the attached device is removed, but others do not. Section 9.4.3.10 of the SAS Protocol Layer 2 revision 04b does not require them to do so. Approved by: ken (mentor) Modified: stable/9/sbin/camcontrol/camcontrol.c Directory Properties: stable/9/sbin/camcontrol/ (props changed) Modified: stable/9/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/9/sbin/camcontrol/camcontrol.c Wed Jun 12 21:12:05 2013 (r251668) +++ stable/9/sbin/camcontrol/camcontrol.c Wed Jun 12 21:41:09 2013 (r251669) @@ -7137,8 +7137,12 @@ smpphylist(struct cam_device *device, in continue; } - item = findsasdevice(&devlist, - scsi_8btou64(disresponse->attached_sas_address)); + if (disresponse->attached_device == SMP_DIS_AD_TYPE_NONE) { + item = NULL; + } else { + item = findsasdevice(&devlist, + scsi_8btou64(disresponse->attached_sas_address)); + } if ((quiet == 0) || (item != NULL)) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306122141.r5CLf9ql063863>