Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 May 2011 13:16:02 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r221384 - head/sys/cam
Message-ID:  <201105031316.p43DG21G094664@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue May  3 13:16:02 2011
New Revision: 221384
URL: http://svn.freebsd.org/changeset/base/221384

Log:
  Do not report legacy unit numbers (do not create legacy aliases) for disks
  on port multiplier ports above first two. They don't fit into ATA_STATIC_ID
  scheme and so can't be mapped properly. No need to pollute dev.

Modified:
  head/sys/cam/cam_xpt.c

Modified: head/sys/cam/cam_xpt.c
==============================================================================
--- head/sys/cam/cam_xpt.c	Tue May  3 12:29:03 2011	(r221383)
+++ head/sys/cam/cam_xpt.c	Tue May  3 13:16:02 2011	(r221384)
@@ -3600,9 +3600,12 @@ xpt_path_legacy_ata_id(struct cam_path *
 		}
 		xpt_unlock_buses();
 	}
-	if (path->target != NULL)
-		return (bus_id * 2 + path->target->target_id);
-	else
+	if (path->target != NULL) {
+		if (path->target->target_id < 2)
+			return (bus_id * 2 + path->target->target_id);
+		else
+			return (-1);
+	} else
 		return (bus_id * 2);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105031316.p43DG21G094664>