diff options
author | Warner Losh <imp@FreeBSD.org> | 2021-11-05 14:56:13 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2021-11-05 14:56:13 +0000 |
commit | 00f79c97a4f265f8d653a11fdb764cd999b7d0a9 (patch) | |
tree | 98058e0c6a85afdaca78a4b7f2a579a29f762d81 | |
parent | 517e52b6c21ccff22c46df0dcd15c19baee3d86c (diff) | |
download | src-00f79c97a4f265f8d653a11fdb764cd999b7d0a9.tar.gz src-00f79c97a4f265f8d653a11fdb764cd999b7d0a9.zip |
cam_periph: Remove vestigial "scbus" comparison
The code in camperiphunit rejects "scbus" as an 'at' location that would
allow any other wiring to use that unit number. Yet in
camperiphunitnext, if we have a no target and the 'at' location of
'scbus' it would be excluded on the basis that it's a wiring
cadidate. This is improper and appears to be a hold-over of the
pre-hints / pre-newbus config system, so remove it.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D32680
-rw-r--r-- | sys/cam/cam_periph.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index d8fd41d77be7..990854f992c3 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -568,9 +568,10 @@ camperiphnextunit(struct periph_driver *p_drv, u_int newunit, int wired, break; /* - * Don't match entries like "da 4" as a wired down - * device, but do match entries like "da 4 target 5" - * or even "da 4 scbus 1". + * Don't allow the mere presence of any attributes of a device + * means that it is for a wired down entry. Instead, insist that + * one of the matching criteria from camperiphunit be present + * for the device. */ i = 0; dname = periph_name; @@ -580,8 +581,7 @@ camperiphnextunit(struct periph_driver *p_drv, u_int newunit, int wired, break; /* if no "target" and no specific scbus, skip */ if (resource_int_value(dname, dunit, "target", &val) && - (resource_string_value(dname, dunit, "at",&strval)|| - strcmp(strval, "scbus") == 0)) + resource_string_value(dname, dunit, "at",&strval)) continue; if (newunit == dunit) break; |