svn commit: r254181 - in projects/camlock/sys/cam: ata scsi

Alexander Motin mav at FreeBSD.org
Sat Aug 10 16:23:32 UTC 2013


Author: mav
Date: Sat Aug 10 16:23:29 2013
New Revision: 254181
URL: http://svnweb.freebsd.org/changeset/base/254181

Log:
  When creating periph on AC_FOUND_DEVICE, use the path from the call, but
  not the one referenced by CCB passed as the argument.  If async is queued,
  the argument pointer should stay valid, but references from it may not.

Modified:
  projects/camlock/sys/cam/ata/ata_da.c
  projects/camlock/sys/cam/ata/ata_pmp.c
  projects/camlock/sys/cam/scsi/scsi_cd.c
  projects/camlock/sys/cam/scsi/scsi_ch.c
  projects/camlock/sys/cam/scsi/scsi_da.c
  projects/camlock/sys/cam/scsi/scsi_enc.c
  projects/camlock/sys/cam/scsi/scsi_pass.c
  projects/camlock/sys/cam/scsi/scsi_pt.c
  projects/camlock/sys/cam/scsi/scsi_sa.c
  projects/camlock/sys/cam/scsi/scsi_sg.c

Modified: projects/camlock/sys/cam/ata/ata_da.c
==============================================================================
--- projects/camlock/sys/cam/ata/ata_da.c	Sat Aug 10 14:33:56 2013	(r254180)
+++ projects/camlock/sys/cam/ata/ata_da.c	Sat Aug 10 16:23:29 2013	(r254181)
@@ -931,7 +931,7 @@ adaasync(void *callback_arg, u_int32_t c
 		status = cam_periph_alloc(adaregister, adaoninvalidate,
 					  adacleanup, adastart,
 					  "ada", CAM_PERIPH_BIO,
-					  cgd->ccb_h.path, adaasync,
+					  path, adaasync,
 					  AC_FOUND_DEVICE, cgd);
 
 		if (status != CAM_REQ_CMP

Modified: projects/camlock/sys/cam/ata/ata_pmp.c
==============================================================================
--- projects/camlock/sys/cam/ata/ata_pmp.c	Sat Aug 10 14:33:56 2013	(r254180)
+++ projects/camlock/sys/cam/ata/ata_pmp.c	Sat Aug 10 16:23:29 2013	(r254181)
@@ -295,7 +295,7 @@ pmpasync(void *callback_arg, u_int32_t c
 		status = cam_periph_alloc(pmpregister, pmponinvalidate,
 					  pmpcleanup, pmpstart,
 					  "pmp", CAM_PERIPH_BIO,
-					  cgd->ccb_h.path, pmpasync,
+					  path, pmpasync,
 					  AC_FOUND_DEVICE, cgd);
 
 		if (status != CAM_REQ_CMP

Modified: projects/camlock/sys/cam/scsi/scsi_cd.c
==============================================================================
--- projects/camlock/sys/cam/scsi/scsi_cd.c	Sat Aug 10 14:33:56 2013	(r254180)
+++ projects/camlock/sys/cam/scsi/scsi_cd.c	Sat Aug 10 16:23:29 2013	(r254181)
@@ -551,7 +551,7 @@ cdasync(void *callback_arg, u_int32_t co
 		status = cam_periph_alloc(cdregister, cdoninvalidate,
 					  cdcleanup, cdstart,
 					  "cd", CAM_PERIPH_BIO,
-					  cgd->ccb_h.path, cdasync,
+					  path, cdasync,
 					  AC_FOUND_DEVICE, cgd);
 
 		if (status != CAM_REQ_CMP

Modified: projects/camlock/sys/cam/scsi/scsi_ch.c
==============================================================================
--- projects/camlock/sys/cam/scsi/scsi_ch.c	Sat Aug 10 14:33:56 2013	(r254180)
+++ projects/camlock/sys/cam/scsi/scsi_ch.c	Sat Aug 10 16:23:29 2013	(r254181)
@@ -354,7 +354,7 @@ chasync(void *callback_arg, u_int32_t co
 		 */
 		status = cam_periph_alloc(chregister, choninvalidate,
 					  chcleanup, chstart, "ch",
-					  CAM_PERIPH_BIO, cgd->ccb_h.path,
+					  CAM_PERIPH_BIO, path,
 					  chasync, AC_FOUND_DEVICE, cgd);
 
 		if (status != CAM_REQ_CMP

Modified: projects/camlock/sys/cam/scsi/scsi_da.c
==============================================================================
--- projects/camlock/sys/cam/scsi/scsi_da.c	Sat Aug 10 14:33:56 2013	(r254180)
+++ projects/camlock/sys/cam/scsi/scsi_da.c	Sat Aug 10 16:23:29 2013	(r254181)
@@ -1592,7 +1592,7 @@ daasync(void *callback_arg, u_int32_t co
 		status = cam_periph_alloc(daregister, daoninvalidate,
 					  dacleanup, dastart,
 					  "da", CAM_PERIPH_BIO,
-					  cgd->ccb_h.path, daasync,
+					  path, daasync,
 					  AC_FOUND_DEVICE, cgd);
 
 		if (status != CAM_REQ_CMP

Modified: projects/camlock/sys/cam/scsi/scsi_enc.c
==============================================================================
--- projects/camlock/sys/cam/scsi/scsi_enc.c	Sat Aug 10 14:33:56 2013	(r254180)
+++ projects/camlock/sys/cam/scsi/scsi_enc.c	Sat Aug 10 16:23:29 2013	(r254181)
@@ -246,7 +246,7 @@ enc_async(void *callback_arg, uint32_t c
 
 		status = cam_periph_alloc(enc_ctor, enc_oninvalidate,
 		    enc_dtor, NULL, "ses", CAM_PERIPH_BIO,
-		    cgd->ccb_h.path, enc_async, AC_FOUND_DEVICE, cgd);
+		    path, enc_async, AC_FOUND_DEVICE, cgd);
 
 		if (status != CAM_REQ_CMP && status != CAM_REQ_INPROG) {
 			printf("enc_async: Unable to probe new device due to "

Modified: projects/camlock/sys/cam/scsi/scsi_pass.c
==============================================================================
--- projects/camlock/sys/cam/scsi/scsi_pass.c	Sat Aug 10 14:33:56 2013	(r254180)
+++ projects/camlock/sys/cam/scsi/scsi_pass.c	Sat Aug 10 16:23:29 2013	(r254181)
@@ -299,7 +299,7 @@ passasync(void *callback_arg, u_int32_t 
 		 */
 		status = cam_periph_alloc(passregister, passoninvalidate,
 					  passcleanup, NULL, "pass",
-					  CAM_PERIPH_BIO, cgd->ccb_h.path,
+					  CAM_PERIPH_BIO, path,
 					  passasync, AC_FOUND_DEVICE, cgd);
 
 		if (status != CAM_REQ_CMP

Modified: projects/camlock/sys/cam/scsi/scsi_pt.c
==============================================================================
--- projects/camlock/sys/cam/scsi/scsi_pt.c	Sat Aug 10 14:33:56 2013	(r254180)
+++ projects/camlock/sys/cam/scsi/scsi_pt.c	Sat Aug 10 16:23:29 2013	(r254181)
@@ -380,7 +380,7 @@ ptasync(void *callback_arg, u_int32_t co
 		 */
 		status = cam_periph_alloc(ptctor, ptoninvalidate, ptdtor,
 					  ptstart, "pt", CAM_PERIPH_BIO,
-					  cgd->ccb_h.path, ptasync,
+					  path, ptasync,
 					  AC_FOUND_DEVICE, cgd);
 
 		if (status != CAM_REQ_CMP

Modified: projects/camlock/sys/cam/scsi/scsi_sa.c
==============================================================================
--- projects/camlock/sys/cam/scsi/scsi_sa.c	Sat Aug 10 14:33:56 2013	(r254180)
+++ projects/camlock/sys/cam/scsi/scsi_sa.c	Sat Aug 10 16:23:29 2013	(r254181)
@@ -1430,7 +1430,7 @@ saasync(void *callback_arg, u_int32_t co
 		 */
 		status = cam_periph_alloc(saregister, saoninvalidate,
 					  sacleanup, sastart,
-					  "sa", CAM_PERIPH_BIO, cgd->ccb_h.path,
+					  "sa", CAM_PERIPH_BIO, path,
 					  saasync, AC_FOUND_DEVICE, cgd);
 
 		if (status != CAM_REQ_CMP

Modified: projects/camlock/sys/cam/scsi/scsi_sg.c
==============================================================================
--- projects/camlock/sys/cam/scsi/scsi_sg.c	Sat Aug 10 14:33:56 2013	(r254180)
+++ projects/camlock/sys/cam/scsi/scsi_sg.c	Sat Aug 10 16:23:29 2013	(r254181)
@@ -281,7 +281,7 @@ sgasync(void *callback_arg, uint32_t cod
 		 */
 		status = cam_periph_alloc(sgregister, sgoninvalidate,
 					  sgcleanup, NULL, "sg",
-					  CAM_PERIPH_BIO, cgd->ccb_h.path,
+					  CAM_PERIPH_BIO, path,
 					  sgasync, AC_FOUND_DEVICE, cgd);
 		if ((status != CAM_REQ_CMP) && (status != CAM_REQ_INPROG)) {
 			const struct cam_status_entry *entry;


More information about the svn-src-projects mailing list