Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177564778
D58527.1794746023.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D58527.1794746023.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
@@ -667,6 +667,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)
{
@@ -680,6 +691,8 @@
return;
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];
@@ -2135,14 +2148,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
Sun, Nov 15, 12:33 PM (8 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41742757
Default Alt Text
D58527.1794746023.diff (1 KB)
Attached To
Mode
D58527: cam: Add devctl message for invalidation of a periph.
Attached
Detach File
Event Timeline