From 2de5e9bab322e97483d045f910099d508562d7ef Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Fri, 12 Jun 2009 08:44:38 -0700 Subject: [PATCH] AHCI - follow fixes to CAM * Forgot to commit the CAM changes to use xpt_action_async(). --- sys/dev/disk/ahci/ahci_cam.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/dev/disk/ahci/ahci_cam.c b/sys/dev/disk/ahci/ahci_cam.c index d622e2b1d3..0e30e93239 100644 --- a/sys/dev/disk/ahci/ahci_cam.c +++ b/sys/dev/disk/ahci/ahci_cam.c @@ -670,11 +670,11 @@ ahci_cam_rescan(struct ahci_port *ap) return; xpt_setup_ccb(&ccb->ccb_h, path, 5); /* 5 = low priority */ - ccb->ccb_h.func_code = XPT_ENG_EXEC | XPT_FC_QUEUED; + ccb->ccb_h.func_code = XPT_ENG_EXEC; ccb->ccb_h.cbfcnp = ahci_cam_rescan_callback; ccb->ccb_h.sim_priv.entries[0].ptr = ap; ccb->crcn.flags = CAM_FLAG_NONE; - xpt_action(ccb); + xpt_action_async(ccb); /* scan is now underway */ } @@ -692,11 +692,11 @@ ahci_xpt_rescan(struct ahci_port *ap) return; ccb = kmalloc(sizeof(*ccb), M_TEMP, M_WAITOK | M_ZERO); xpt_setup_ccb(&ccb->ccb_h, path, 5); /* 5 = low priority */ - ccb->ccb_h.func_code = XPT_SCAN_BUS | XPT_FC_QUEUED; + ccb->ccb_h.func_code = XPT_SCAN_BUS; ccb->ccb_h.cbfcnp = ahci_cam_rescan_callback; ccb->ccb_h.sim_priv.entries[0].ptr = ap; ccb->crcn.flags = CAM_FLAG_NONE; - xpt_action(ccb); + xpt_action_async(ccb); } #if 0 @@ -783,7 +783,9 @@ ahci_xpt_action(struct cam_sim *sim, union ccb *ccb) * probed. */ ccbh->status = CAM_REQ_CMP; + lwkt_serialize_enter(&ap->ap_sc->sc_serializer); ahci_port_state_machine(ap); + lwkt_serialize_exit(&ap->ap_sc->sc_serializer); xpt_done(ccb); /* -- 2.41.0