PERFORCE change 117988 for review

Scott Long scottl at FreeBSD.org
Fri Apr 13 05:12:17 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=117988

Change 117988 by scottl at scottl-y1 on 2007/04/13 05:11:35

	Drop the periph lock around calling make_dev

Affected files ...

.. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_ch.c#10 edit
.. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_ses.c#12 edit
.. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_sg.c#5 edit

Differences ...

==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_ch.c#10 (text+ko) ====

@@ -374,9 +374,11 @@
 			  DEVSTAT_PRIORITY_OTHER);
 
 	/* Register the device */
+	cam_periph_unlock(periph);
 	softc->dev = make_dev(&ch_cdevsw, periph->unit_number, UID_ROOT,
 			      GID_OPERATOR, 0600, "%s%d", periph->periph_name,
 			      periph->unit_number);
+	cam_periph_lock(periph);
 	softc->dev->si_drv1 = periph;
 
 	/*

==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_ses.c#12 (text+ko) ====

@@ -364,9 +364,11 @@
 		return (CAM_REQ_CMP_ERR);
 	}
 
+	cam_periph_unlock(periph);
 	softc->ses_dev = make_dev(&ses_cdevsw, unit2minor(periph->unit_number),
 	    UID_ROOT, GID_OPERATOR, 0600, "%s%d",
 	    periph->periph_name, periph->unit_number);
+	cam_periph_lock(periph);
 	softc->ses_dev->si_drv1 = periph;
 
 	/*

==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_sg.c#5 (text+ko) ====

@@ -319,11 +319,13 @@
 			DEVSTAT_PRIORITY_PASS);
 
 	/* Register the device */
+	cam_periph_unlock(periph);
 	softc->dev = make_dev(&sg_cdevsw, unit2minor(periph->unit_number),
 			      UID_ROOT, GID_OPERATOR, 0600, "%s%d",
 			      periph->periph_name, periph->unit_number);
 	softc->devalias = make_dev_alias(softc->dev, "sg%c",
 					 'a' + periph->unit_number);
+	cam_periph_lock(periph);
 	softc->dev->si_drv1 = periph;
 
 	/*


More information about the p4-projects mailing list