Date: Mon, 28 Jun 2021 22:24:03 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: d6e7349254e3 - main - cam mmc: Assert that the xpt_bus_register registered a device_t Message-ID: <202106282224.15SMO3Yi048773@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d6e7349254e3d26bbecf105be28686a5eb976537 commit d6e7349254e3d26bbecf105be28686a5eb976537 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2021-06-28 21:59:04 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2021-06-28 21:59:04 +0000 cam mmc: Assert that the xpt_bus_register registered a device_t Reviewed by: scottl@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30854 --- sys/cam/mmc/mmc_xpt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c index 6b2fecdab0fb..c94e74876ed7 100644 --- a/sys/cam/mmc/mmc_xpt.c +++ b/sys/cam/mmc/mmc_xpt.c @@ -406,8 +406,6 @@ mmccam_start_discovery(struct cam_sim *sim) union ccb *ccb; uint32_t pathid; - KASSERT(sim->sim_dev != NULL, ("mmccam_start_discovery(%s): sim_dev is not initialized," - " has cam_sim_alloc_dev() been used?", cam_sim_name(sim))); pathid = cam_sim_path(sim); ccb = xpt_alloc_ccb(); @@ -420,6 +418,10 @@ mmccam_start_discovery(struct cam_sim *sim) xpt_free_ccb(ccb); return; } + + KASSERT(xpt_path_sim_device(&ccb->ccb_h.path) != NULL, + ("%s(%s): device is not initialized on sim's path", + __func__, cam_sim_name(sim))); xpt_rescan(ccb); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106282224.15SMO3Yi048773>