Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 May 2010 22:22:01 +0000 (UTC)
From:      Matt Jacob <mjacob@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r207933 - head/sys/cam/scsi
Message-ID:  <201005112222.o4BMM1uq012874@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjacob
Date: Tue May 11 22:22:01 2010
New Revision: 207933
URL: http://svn.freebsd.org/changeset/base/207933

Log:
  Deal sensibly with more than 26 sg devices. It isn't a complete
  solution.
  
  Sponsored by:   Panasas
  MFC after:	1 week

Modified:
  head/sys/cam/scsi/scsi_sg.c

Modified: head/sys/cam/scsi/scsi_sg.c
==============================================================================
--- head/sys/cam/scsi/scsi_sg.c	Tue May 11 21:07:47 2010	(r207932)
+++ head/sys/cam/scsi/scsi_sg.c	Tue May 11 22:22:01 2010	(r207933)
@@ -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?201005112222.o4BMM1uq012874>