Hi, On HPE DL20 Gen10, kernel keeps printing "ipmi0: sendcmd fails" if ipmi0 is enabled.
The machine has following 4 sensor devices. 19-P/S 1 Inlet 20-P/S 2 Inlet 21-P/S 1 22-P/S 2 But reading value from these devices fails always. This causes the problem above. The diff makes such the devices disabled if the error happens when probing. ok? Return error value when sending "sensor reading" is failed. This fixes "ipmi0: sendcmd fails" errors when there is a sensor which is enumurated but reading it is failed. Index: sys/dev/ipmi.c =================================================================== RCS file: /var/cvs/openbsd/src/sys/dev/ipmi.c,v retrieving revision 1.109 diff -u -p -r1.109 ipmi.c --- sys/dev/ipmi.c 18 Feb 2020 00:06:12 -0000 1.109 +++ sys/dev/ipmi.c 2 Mar 2020 05:38:25 -0000 @@ -1288,6 +1288,11 @@ read_sensor(struct ipmi_softc *sc, struc c.c_data = data; ipmi_cmd(&c); + if (c.c_ccode != 0) { + dbg_printf(1, "sensor reading command for %s failed: %.2x\n", + psensor->i_sensor.desc, c.c_ccode); + return (rv); + } dbg_printf(10, "values=%.2x %.2x %.2x %.2x %s\n", data[0],data[1],data[2],data[3], psensor->i_sensor.desc); psensor->i_sensor.flags &= ~SENSOR_FINVALID;