https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226578
Warner Losh <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Warner Losh <[email protected]> --- OK. XPT is locking the periph lock in xpt_async_process_dev sometimes, but not other times. The following only takes out the lock when we're likely to change the flags. It's an OK workaround for the moment, if it works, so we can validate the funky locking done in xpt_async_process_dev() and stylize the test a bit better... diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index f5be34f96e0..90045ca3e76 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -2039,10 +2039,10 @@ daasync(void *callback_arg, u_int32_t code, * Handle all UNIT ATTENTIONs except our own, * as they will be handled by daerror(). */ - cam_periph_lock(periph); if (xpt_path_periph(ccb->ccb_h.path) != periph && scsi_extract_sense_ccb(ccb, &error_code, &sense_key, &asc, &ascq)) { + cam_periph_lock(periph); if (asc == 0x2A && ascq == 0x09) { xpt_print(ccb->ccb_h.path, "Capacity data has changed\n"); @@ -2057,8 +2057,8 @@ daasync(void *callback_arg, u_int32_t code, softc->flags &= ~DA_FLAG_PROBED; dareprobe(periph); } + cam_periph_unlock(periph); } - cam_periph_unlock(periph); break; } case AC_SCSI_AEN: -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "[email protected]"
