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;
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to