Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164377090
D58527.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
D58527.diff
View Options
diff --git a/sbin/devd/devd.conf.5 b/sbin/devd/devd.conf.5
--- a/sbin/devd/devd.conf.5
+++ b/sbin/devd/devd.conf.5
@@ -38,7 +38,7 @@
.\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
.\" SOFTWARE.
.\"
-.Dd February 26, 2026
+.Dd July 28, 2026
.Dt DEVD.CONF 5
.Os
.Sh NAME
@@ -362,6 +362,8 @@
Events related to peripheral devices.
.It Li CAM Ta Li periph Ta Li error Ta
Generic errors.
+.It Li CAM Ta Li periph Ta Li invalidate Ta
+Peripheral invalidation.
.It Li CAM Ta Li periph Ta Li timeout Ta
Command timeouts.
.El
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c
--- a/sys/cam/cam_periph.c
+++ b/sys/cam/cam_periph.c
@@ -677,6 +677,17 @@
return (unit);
}
+static void
+cam_periph_invalidate_devctl(struct cam_periph *periph)
+{
+ struct sbuf sb;
+ char *sbmsg;
+
+ sbmsg = cam_periph_devctl_sb_init(&sb, periph);
+ if (sbmsg != NULL)
+ cam_periph_devctl_sb_fini(&sb, sbmsg, "invalidate");
+}
+
void
cam_periph_invalidate(struct cam_periph *periph)
{
@@ -691,6 +702,8 @@
CAM_PROBE1(periph, invalidate, periph);
CAM_DEBUG(periph->path, CAM_DEBUG_INFO, ("Periph invalidated\n"));
+ if (!rebooting)
+ cam_periph_invalidate_devctl(periph);
if ((periph->flags & CAM_PERIPH_ANNOUNCED) && !rebooting) {
struct sbuf sb;
char buffer[160];
@@ -2149,14 +2162,20 @@
sbuf_printf(sb, "device=%s%d ", periph->periph_name,
periph->unit_number);
- sbuf_cat(sb, "serial=\"");
if ((cgd = (struct ccb_getdev *)xpt_alloc_ccb_nowait()) != NULL) {
xpt_gdev_type(cgd, periph->path);
- if (cgd->ccb_h.status == CAM_REQ_CMP)
+ if (cgd->ccb_h.status == CAM_REQ_CMP &&
+ cgd->serial_num_len > 0) {
+ sbuf_cat(sb, "serial=\"");
sbuf_bcat(sb, cgd->serial_num, cgd->serial_num_len);
+ sbuf_cat(sb, "\" ");
+ } else {
+ sbuf_cat(sb, "path=\"");
+ xpt_path_sbuf(periph->path, sb);
+ sbuf_cat(sb, "\" ");
+ }
xpt_free_ccb((union ccb *)cgd);
}
- sbuf_cat(sb, "\" ");
return (sbmsg);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Aug 1, 7:22 AM (3 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35816100
Default Alt Text
D58527.diff (1 KB)
Attached To
Mode
D58527: cam: Add devctl message for invalidation of a periph.
Attached
Detach File
Event Timeline
Log In to Comment