summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorasomers <asomers@FreeBSD.org>2013-05-15 17:26:50 +0000
committerasomers <asomers@FreeBSD.org>2013-05-15 17:26:50 +0000
commitd8aa05d9721062c5d7ee6fa22d937ed4cf50db04 (patch)
treecd0acd8af1257db2a105cd7e33cb70ead06a6c34 /sbin
parentcbe843df9c49bd892bf85b7e7fe7524a050a497d (diff)
downloadFreeBSD-src-d8aa05d9721062c5d7ee6fa22d937ed4cf50db04.zip
FreeBSD-src-d8aa05d9721062c5d7ee6fa22d937ed4cf50db04.tar.gz
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) MFC after: 3 weeks
Diffstat (limited to 'sbin')
-rw-r--r--sbin/camcontrol/camcontrol.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c
index 7f13520..7a374a4 100644
--- a/sbin/camcontrol/camcontrol.c
+++ b/sbin/camcontrol/camcontrol.c
@@ -7138,8 +7138,12 @@ smpphylist(struct cam_device *device, int argc, char **argv,
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)) {
OpenPOWER on IntegriCloud