diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -2198,7 +2198,8 @@ ccb = (union ccb *)arg; /* - * Handle all UNIT ATTENTIONs except our own, as they will be + * Unit attentions are broadcast to all the LUNs of the device + * so handle all UNIT ATTENTIONs except our own, as they will be * handled by daerror(). */ if (xpt_path_periph(ccb->ccb_h.path) != periph && @@ -6028,6 +6029,16 @@ /* 28/0: NOT READY TO READY CHANGE, MEDIUM MAY HAVE CHANGED */ softc->flags &= ~DA_FLAG_PROBED; disk_media_changed(softc->disk, M_NOWAIT); + /* + * In an ideal world, we'd make sure that we have the + * same medium mounted (if we'd seen one already) but + * instead we don't invalidate the pack here and flag + * below to retry the UAs. If we exhaust retries, then + * we'll invalidate it in dadone for ENXIO errors (which + * 28/0 will fail with eventually). Usually, retrying + * just works and/or we get this before we've opened the + * device (which clears the invalid flag). + */ } else if (sense_key == SSD_KEY_UNIT_ATTENTION && asc == 0x3F && ascq == 0x03) { /* 3f/3: INQUIRY DATA HAS CHANGED */