svn commit: r259721 - stable/10/sys/cam/scsi
Alexander Motin
mav at FreeBSD.org
Sun Dec 22 13:02:35 UTC 2013
Author: mav
Date: Sun Dec 22 13:02:34 2013
New Revision: 259721
URL: http://svnweb.freebsd.org/changeset/base/259721
Log:
MFC r259108:
When comparing device IDs, make sure that they have the same type
(like NAA assigned) and identify the same entity (like device or port).
Otherwise there can be false positives since at least some models of
Seagate disks use same IDs for the whole device and one of its ports.
Modified:
stable/10/sys/cam/scsi/scsi_all.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/cam/scsi/scsi_all.c
==============================================================================
--- stable/10/sys/cam/scsi/scsi_all.c Sun Dec 22 12:53:56 2013 (r259720)
+++ stable/10/sys/cam/scsi/scsi_all.c Sun Dec 22 13:02:34 2013 (r259721)
@@ -6509,7 +6509,11 @@ scsi_devid_match(uint8_t *lhs, size_t lh
while (rhs_id <= rhs_last
&& (rhs_id->identifier + rhs_id->length) <= rhs_end) {
- if (rhs_id->length == lhs_id->length
+ if ((rhs_id->id_type &
+ (SVPD_ID_ASSOC_MASK | SVPD_ID_TYPE_MASK)) ==
+ (lhs_id->id_type &
+ (SVPD_ID_ASSOC_MASK | SVPD_ID_TYPE_MASK))
+ && rhs_id->length == lhs_id->length
&& memcmp(rhs_id->identifier, lhs_id->identifier,
rhs_id->length) == 0)
return (0);
More information about the svn-src-stable-10
mailing list