Commit 177f8b32 authored by Yuri's avatar Yuri Committed by Philip Paeps
Browse files

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]
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D35612
parent 18db96db
...@@ -309,9 +309,12 @@ ipmi_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, ...@@ -309,9 +309,12 @@ ipmi_ioctl(struct cdev *cdev, u_long cmd, caddr_t data,
return (error); return (error);
if (addr.addr_type == IPMI_SYSTEM_INTERFACE_ADDR_TYPE) { 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, kreq = ipmi_alloc_request(dev, req->msgid,
IPMI_ADDR(req->msg.netfn, 0), req->msg.cmd, IPMI_ADDR(req->msg.netfn, saddr->lun & 0x3),
req->msg.data_len, IPMI_MAX_RX); req->msg.cmd, req->msg.data_len, IPMI_MAX_RX);
error = copyin(req->msg.data, kreq->ir_request, error = copyin(req->msg.data, kreq->ir_request,
req->msg.data_len); req->msg.data_len);
if (error) { if (error) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment