Page MenuHomeFreeBSD

D48839.diff
No OneTemporary

D48839.diff

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
@@ -2208,7 +2208,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 &&
@@ -6050,6 +6051,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 */

File Metadata

Mime Type
text/plain
Expires
Wed, Feb 5, 7:32 PM (17 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16478851
Default Alt Text
D48839.diff (1 KB)

Event Timeline