Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jun 2010 04:43:22 +0000 (UTC)
From:      Matt Jacob <mjacob@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r209280 - stable/8/sys/cam/scsi
Message-ID:  <201006180443.o5I4hM9P051429@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjacob
Date: Fri Jun 18 04:43:22 2010
New Revision: 209280
URL: http://svn.freebsd.org/changeset/base/209280

Log:
  This is an MFC of 207933
  
  Deal sensibly with more than 26 sg devices. It isn't a complete
  solution.

Modified:
  stable/8/sys/cam/scsi/scsi_sg.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/geom/sched/   (props changed)

Modified: stable/8/sys/cam/scsi/scsi_sg.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_sg.c	Fri Jun 18 04:01:59 2010	(r209279)
+++ stable/8/sys/cam/scsi/scsi_sg.c	Fri Jun 18 04:43:22 2010	(r209280)
@@ -303,7 +303,12 @@ sgregister(struct cam_periph *periph, vo
 	softc->dev = make_dev(&sg_cdevsw, periph->unit_number,
 			      UID_ROOT, GID_OPERATOR, 0600, "%s%d",
 			      periph->periph_name, periph->unit_number);
-	(void)make_dev_alias(softc->dev, "sg%c", 'a' + periph->unit_number);
+	if (periph->unit_number < 26) {
+		(void)make_dev_alias(softc->dev, "sg%c", periph->unit_number + 'a');
+	} else {
+		(void)make_dev_alias(softc->dev, "sg%c%c",
+		    ((periph->unit_number / 26) - 1) + 'a', periph->unit_number + 'a');
+	}
 	cam_periph_lock(periph);
 	softc->dev->si_drv1 = periph;
 



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