git: 81fe400fb1e2 - stable/13 - ipmi: do not omit lun in BMC addresses
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 11 Jul 2022 03:15:20 UTC
The branch stable/13 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=81fe400fb1e2d4df46bfb2240711fee56789d3ea commit 81fe400fb1e2d4df46bfb2240711fee56789d3ea Author: Yuri <yuri@aetern.org> AuthorDate: 2022-07-04 06:29:52 +0000 Commit: Philip Paeps <philip@FreeBSD.org> CommitDate: 2022-07-11 03:10:23 +0000 ipmi: do not omit lun in BMC addresses Some systems put sensors on non-0 lun, so we should not omit it. This was the only difference with the Linux driver, where DIMM sensors could be queried, but not on FreeBSD. See this report[1] on the FreeBSD forums: https://forums.freebsd.org/threads/freebsd-cannot-get-dimm-temperature-sensor-value.85166/ Reviewed by: philip Tested by: Andrey Lanin[1] Differential Revision: https://reviews.freebsd.org/D35612 (cherry picked from commit 177f8b3294ef5717060c287fe1206c52ba3ecc53) --- sys/dev/ipmi/ipmi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/dev/ipmi/ipmi.c b/sys/dev/ipmi/ipmi.c index 3666b8dd2033..ec9ede66e556 100644 --- a/sys/dev/ipmi/ipmi.c +++ b/sys/dev/ipmi/ipmi.c @@ -309,9 +309,12 @@ ipmi_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, return (error); if (addr.addr_type == IPMI_SYSTEM_INTERFACE_ADDR_TYPE) { + struct ipmi_system_interface_addr *saddr = + (struct ipmi_system_interface_addr *)&addr; + kreq = ipmi_alloc_request(dev, req->msgid, - IPMI_ADDR(req->msg.netfn, 0), req->msg.cmd, - req->msg.data_len, IPMI_MAX_RX); + IPMI_ADDR(req->msg.netfn, saddr->lun & 0x3), + req->msg.cmd, req->msg.data_len, IPMI_MAX_RX); error = copyin(req->msg.data, kreq->ir_request, req->msg.data_len); if (error) {