cam_periph: fix bug in camperiphunitnext logic
If we assigned just a lun as a wired unit (something that camperiphunit will accept), we failed to properly skip over that unit when computing a next unit number. Add lun so the code matches the comments that we have to skip all the same criteria that camperiphunit uses to select wired units for a driver. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32682
This commit is contained in:
parent
bee0133fb9
commit
710a519ebb
@ -582,7 +582,8 @@ camperiphnextunit(struct periph_driver *p_drv, u_int newunit, int wired,
|
||||
|
||||
if (newunit != dunit)
|
||||
continue;
|
||||
if (resource_int_value(dname, dunit, "target", &val) == 0 ||
|
||||
if (resource_int_value(dname, dunit, "lun", &val) == 0 ||
|
||||
resource_int_value(dname, dunit, "target", &val) == 0 ||
|
||||
resource_string_value(dname, dunit, "at", &strval) == 0)
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user