From owner-svn-src-head@freebsd.org Thu Mar 5 06:20:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EBC1325E965; Thu, 5 Mar 2020 06:20:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Y0wf4Cq0z4ZGn; Thu, 5 Mar 2020 06:20:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14A7A2A73; Thu, 5 Mar 2020 06:20:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0256KHc8053352; Thu, 5 Mar 2020 06:20:17 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256KHrR053351; Thu, 5 Mar 2020 06:20:17 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003050620.0256KHrR053351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 5 Mar 2020 06:20:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358662 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 358662 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 06:20:19 -0000 Author: imp Date: Thu Mar 5 06:20:17 2020 New Revision: 358662 URL: https://svnweb.freebsd.org/changeset/base/358662 Log: xpt_async is submitting a CCB, not finishing it up, so use xpt_action() instead of xpt_done(). Add the missing XPT_ASYNC case to xpt_action_default. xpt_async wants to use the side-effect of the xpt_done() routine to queue this to the camisr thread so it can be done in that context. However, this breaks the symmetry that you create a ccb and call xpt_action() for it to be dispatched. Restore that symmetry by having it go through that path. As far as I can tell, this is the only CCB that we create and call xpt_done() on directly. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Mar 5 06:19:21 2020 (r358661) +++ head/sys/cam/cam_xpt.c Thu Mar 5 06:20:17 2020 (r358662) @@ -3156,6 +3156,10 @@ call_sim: start_ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(start_ccb); break; + case XPT_ASYNC: + start_ccb->ccb_h.status = CAM_REQ_CMP; + xpt_done(start_ccb); + break; default: case XPT_SDEV_TYPE: case XPT_TERM_IO: @@ -4447,7 +4451,7 @@ xpt_async(u_int32_t async_code, struct cam_path *path, xpt_freeze_devq(path, 1); else xpt_freeze_simq(path->bus->sim, 1); - xpt_done(ccb); + xpt_action(ccb); } static void