svn commit: r281531 - head/sys/cam

Alan Somers asomers at FreeBSD.org
Tue Apr 14 16:33:34 UTC 2015


Author: asomers
Date: Tue Apr 14 16:33:33 2015
New Revision: 281531
URL: https://svnweb.freebsd.org/changeset/base/281531

Log:
  Initialize async_arg_ptr in xpt_async when called with async_code
  AC_ADVINFO_CHANGED.
  
  Without this change, newly inserted hard disks won't always have their
  physical path device nodes created.  The problem reproduces most readily
  when attaching a large number of disks at once.
  
  Differential Revision:	https://reviews.freebsd.org/D2290
  Reviewed by:	mav, imp
  MFC after:	2 weeks
  Sponsored by:	Spectra Logic

Modified:
  head/sys/cam/cam_xpt.c

Modified: head/sys/cam/cam_xpt.c
==============================================================================
--- head/sys/cam/cam_xpt.c	Tue Apr 14 15:21:20 2015	(r281530)
+++ head/sys/cam/cam_xpt.c	Tue Apr 14 16:33:33 2015	(r281531)
@@ -4264,8 +4264,10 @@ xpt_async(u_int32_t async_code, struct c
 		}
 		memcpy(ccb->casync.async_arg_ptr, async_arg, size);
 		ccb->casync.async_arg_size = size;
-	} else if (size < 0)
+	} else if (size < 0) {
+		ccb->casync.async_arg_ptr = async_arg;
 		ccb->casync.async_arg_size = size;
+	}
 	if (path->device != NULL && path->device->lun_id != CAM_LUN_WILDCARD)
 		xpt_freeze_devq(path, 1);
 	else


More information about the svn-src-all mailing list