CAM/UMASS - use xpt_action_async() to ensure asynchronous scsi bus scan.
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 25 Jun 2009 18:57:14 +0000 (11:57 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 25 Jun 2009 18:57:14 +0000 (11:57 -0700)
Use the new xpt_action_async() function to ensure that the scsi bus is
rescanned asynchronously.  XPT_SCAN_BUS already sets XPT_FC_QUEUED but
it doesn't apply to command initiation.  The new function does it properly.

sys/dev/usbmisc/umass/umass.c

index 14de9ca..15fe787 100644 (file)
@@ -2763,10 +2763,10 @@ umass_cam_rescan(void *addr)
        }
 
        xpt_setup_ccb(&ccb->ccb_h, path, 5/*priority (low)*/);
-       ccb->ccb_h.func_code = XPT_SCAN_BUS | XPT_FC_QUEUED;
+       ccb->ccb_h.func_code = XPT_SCAN_BUS;
        ccb->ccb_h.cbfcnp = umass_cam_rescan_callback;
        ccb->crcn.flags = CAM_FLAG_NONE;
-       xpt_action(ccb);
+       xpt_action_async(ccb);
 
        /* The scan is in progress now. */
 }