Bring in FreeBSD sesutil fixes
In system from ticket #66540 it stopped all fans. On my test system it causes SCSI command timeout and panic. I guess it may try to modify bits of wrong device, not disk slot, but something else, like fan or enclosure controller. May be off-by-one code error.
[usr.sbin/sesutil] Only operate on device slots
With rS319610 sesutil started twiddling the bits of every SES device.
Not everything is a disk slot, there are also fan controllers,
temperature sensors, even power supplies, among other things controlled
Add a type check to make sure we are only operating on device slot and
array device slot elements. Other type elements will be skipped, but
it would be simple to add additional cases for controlling the ident
LEDs of other element types (which are not necessarily the same bits).
Rather than doing raw bit manipulation of an unstructured byte array
using unnamed numeric constants, leverage existing code abstractions.
- Severity changed from New to Medium
I have attempted this command on another test system (fn03) and experienced unusual behavior there as well. The command took a minute or two to complete, so in addition to logging CDB printfs, I also captured
procstat -kk for sesutil a few times while it was running. This should give me an indication of places to focus my attention on.
Reverting this change resolves the buggy behavior, so I think there needs to be some additional check involved before trying to
do_led() on an object. In the SES spec I see that the bits being twiddled do not control LEDs for all element types. Device element, device slot, array device slot are the types these bits should apply to. It looks like `sesutil fault all off` would end up telling the power supply control element to request the power supply be shut off. There are a lot of other element types where the IDENT bit is in a different position.
I will look into how to better filter the elements to avoid twiddling the wrong bits.
- Status changed from In Progress to Ready for Testing
- Target version changed from Backlog to 11.2-U3
- Needs Merging changed from Yes to No