svn commit: r207933 - head/sys/cam/scsi

Ronald Klop ronald-freebsd8 at klop.yi.org
Wed May 12 07:24:25 UTC 2010


On Wed, 12 May 2010 00:22:01 +0200, Matt Jacob <mjacob at freebsd.org> wrote:

> 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;

Wow, did you copy this from windows? :-)


More information about the svn-src-head mailing list