svn commit: r209280 - stable/8/sys/cam/scsi

Matt Jacob mjacob at FreeBSD.org
Fri Jun 18 04:43:23 UTC 2010


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;
 


More information about the svn-src-all mailing list