Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106949832
D27735.id100902.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D27735.id100902.diff
View Options
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
@@ -2158,7 +2158,7 @@
}
break;
}
- case AC_UNIT_ATTENTION:
+ case AC_UNIT_ATTENTION: /* Called for this path: periph locked */
{
union ccb *ccb;
int error_code, sense_key, asc, ascq;
@@ -2168,9 +2168,7 @@
/*
* Handle all UNIT ATTENTIONs except our own, as they will be
- * handled by daerror(). Since this comes from a different periph,
- * that periph's lock is held, not ours, so we have to take it ours
- * out to touch softc flags.
+ * handled by daerror().
*/
if (xpt_path_periph(ccb->ccb_h.path) != periph &&
scsi_extract_sense_ccb(ccb,
@@ -2178,22 +2176,19 @@
if (asc == 0x2A && ascq == 0x09) {
xpt_print(ccb->ccb_h.path,
"Capacity data has changed\n");
- cam_periph_lock(periph);
+ cam_periph_assert(periph, MA_OWNED);
softc->flags &= ~DA_FLAG_PROBED;
dareprobe(periph);
- cam_periph_unlock(periph);
} else if (asc == 0x28 && ascq == 0x00) {
- cam_periph_lock(periph);
+ cam_periph_assert(periph, MA_OWNED);
softc->flags &= ~DA_FLAG_PROBED;
- cam_periph_unlock(periph);
disk_media_changed(softc->disk, M_NOWAIT);
} else if (asc == 0x3F && ascq == 0x03) {
xpt_print(ccb->ccb_h.path,
"INQUIRY data has changed\n");
- cam_periph_lock(periph);
+ cam_periph_assert(periph, MA_OWNED);
softc->flags &= ~DA_FLAG_PROBED;
dareprobe(periph);
- cam_periph_unlock(periph);
}
}
break;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 8, 10:58 PM (3 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15727158
Default Alt Text
D27735.id100902.diff (1 KB)
Attached To
Mode
D27735: cam: don't lock while handling an AC_UNIT_ATTENTION (da)
Attached
Detach File
Event Timeline
Log In to Comment