diff options
author | asomers <asomers@FreeBSD.org> | 2015-04-14 16:33:33 +0000 |
---|---|---|
committer | asomers <asomers@FreeBSD.org> | 2015-04-14 16:33:33 +0000 |
commit | 4cf0410ad1c223d3d70e686fe913a0ab82c8bc03 (patch) | |
tree | 21a0f3b2e60404133b882d38f6c5855be573ffb9 /sys/cam | |
parent | cb4c6b9356e7db5b16001fc3f95d1157b09fe9b2 (diff) | |
download | FreeBSD-src-4cf0410ad1c223d3d70e686fe913a0ab82c8bc03.zip FreeBSD-src-4cf0410ad1c223d3d70e686fe913a0ab82c8bc03.tar.gz |
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
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/cam_xpt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 06e01fc..ad55373 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -4264,8 +4264,10 @@ xpt_async(u_int32_t async_code, struct cam_path *path, void *async_arg) } 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 |