Date: Thu, 11 Aug 2016 10:54:09 -0700 From: David Wolfskill <david@catwhisker.org> To: hackers@freebsd.org Subject: "ipmi0: KCS..." whines Message-ID: <20160811175409.GW1112@albert.catwhisker.org>
next in thread | raw e-mail | index | archive | help
--hn090KliNom6wizA Content-Type: multipart/mixed; boundary="3xvobRwI6W2FSfVC" Content-Disposition: inline --3xvobRwI6W2FSfVC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I'm trying to figure out how to cope with some messages: =2E.. kernel: ipmi0: KCS: Failed to read completion code =2E.. kernel: ipmi0: KCS error: ff that recently started showing up on some machines at work (which run somethinng based on FreeBSD). As the messages started showing up shortly after a colleague committed some code that would issue "ipmitool dcmi power reading" periodically, I tried issuing the command myself... to no (initial) effect. I then tried doing it in a loop: foreach n (`jot 10`) ipmitool dcmi power reading end Nothing. But then, 10 isn't a very big number, so I tried again with 32 -- and got a few. That said, I have seen no evidence of data corruption or mis-reporting that coincides with the messages being issued: at this point, the messages seem to merely be annoying, and there's nothing I can do to stop getting them (except to not issue "ipmitool dcmi power reading", perhaps). Also, I have no real evidence that whatever is causing the messages to be issued "in real life" is actually related to my "articial" recreation of the symptoms. I poked around a bit, and found that the messages are issued from src/sys/dev/ipmi/ipmi_kcs.c, where device_printf(9) is used to emit them. (Eventually, that gets around to using printf(9), which is why I was unable to merely use syslog.conf to stop spamming the console.) As a proof-of-concept, I cobbled up the attached patch (with significant help from a colleague). It seems to do as intended: suppress the messages for a "normal" boot, but emit them for a verbose boot. I'm not at all happy with that approach: it's way too far on the "treating the symptom" side than "fixing the root cause." On the other hand, it's not clear that emitting a message about which I can do nothing useful is all that ... useful. :-} But ... none of the machines to which I have access and have the requisite hardware are running stock FreeBSD. Is anyone able to reproduce this on a stock FreeBSD machine? Better: anyone have a better idea how to address thhe issue? Thanks! Peace, david --=20 David H. Wolfskill david@catwhisker.org Those who would murder in the name of God or prophet are blasphemous coward= s. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --3xvobRwI6W2FSfVC Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ipmi_kcs.c.diff" Content-Transfer-Encoding: quoted-printable diff --git a/sys/dev/ipmi/ipmi_kcs.c b/sys/dev/ipmi/ipmi_kcs.c --- a/sys/dev/ipmi/ipmi_kcs.c +++ b/sys/dev/ipmi/ipmi_kcs.c @@ -148,7 +148,7 @@ =20 /* Read error status */ data =3D INB(sc, KCS_DATA); - if (data !=3D 0) + if (data !=3D 0 && (data !=3D 0xff || bootverbose)) device_printf(sc->ipmi_dev, "KCS error: %02x\n", data); =20 @@ -414,8 +414,10 @@ =20 /* Next we read the completion code. */ if (kcs_read_byte(sc, &req->ir_compcode) !=3D 1) { - device_printf(sc->ipmi_dev, - "KCS: Failed to read completion code\n"); + if (bootverbose) { + device_printf(sc->ipmi_dev, + "KCS: Failed to read completion code\n"); + } goto fail; } #ifdef KCS_DEBUG --3xvobRwI6W2FSfVC-- --hn090KliNom6wizA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJXrLvBXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDQ0I3Q0VGOTE3QTgwMUY0MzA2NEQ3N0Ix NTM5Q0M0MEEwNDlFRTE3AAoJEBU5zECgSe4XS4UH/A48/9XlKrqqtHK+okEr6FJ0 8Lx1mPYHLRE3+qX9XEjBawJT0P9wLLWPcL6jDaWJvTsyLjif2bGlMmsDNgTxsHy+ siHzJdusVA/GgWtOUtekH9QtMpKszmTPks0wEpheRoGx+HMLZIS3QewM+Sbw9dL5 X7o81vE4Kksh5GBSqrwuNSYbk1kaCl3QjlVWsdcnSafQtM5cWaBfel/lOUeIqmjn zJIcE1ZVUR7vaHEZDBvBAhJtamv6WQSGiAvsdDSu8s8F3ZTyOv/T1MQeVavFmUHM heXHX98wc+8NziTVYdbwNA2tyfbvI0ffKwvJsxwoaJpesZzsIaAkMlvSVdygf40= =0YL2 -----END PGP SIGNATURE----- --hn090KliNom6wizA--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160811175409.GW1112>