<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/char/ipmi/ipmb_dev_int.c, branch v6.0-rc4</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>ipmi: use simple i2c probe function</title>
<updated>2022-05-12T15:00:03+00:00</updated>
<author>
<name>Stephen Kitt</name>
<email>steve@sk2.org</email>
</author>
<published>2022-03-24T17:11:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0924c5a0cbed5831a2a0ff2f9a19692265f1ab92'/>
<id>0924c5a0cbed5831a2a0ff2f9a19692265f1ab92</id>
<content type='text'>
The i2c probe functions here don't use the id information provided in
their second argument, so the single-parameter i2c probe function
("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

Signed-off-by: Stephen Kitt &lt;steve@sk2.org&gt;
Message-Id: &lt;20220324171159.544565-1-steve@sk2.org&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Reviewed-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The i2c probe functions here don't use the id information provided in
their second argument, so the single-parameter i2c probe function
("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

Signed-off-by: Stephen Kitt &lt;steve@sk2.org&gt;
Message-Id: &lt;20220324171159.544565-1-steve@sk2.org&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Reviewed-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: remove open coded version of SMBus block write</title>
<updated>2021-01-28T13:15:12+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2021-01-28T08:55:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fc26067c7417e7fafed7bcc97bda155d91988734'/>
<id>fc26067c7417e7fafed7bcc97bda155d91988734</id>
<content type='text'>
The block-write function of the core was not used because there was no
client-struct to use. However, in this case it seems apropriate to use a
temporary client struct. Because we are answering a request we recieved
when being a client ourselves. So, convert the code to use a temporary
client and use the block-write function of the I2C core.

Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Reviewed-by: Asmaa Mnebhi &lt;asmaa@nvidia.com&gt;
Acked-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Message-Id: &lt;20210128085544.7609-1-wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The block-write function of the core was not used because there was no
client-struct to use. However, in this case it seems apropriate to use a
temporary client struct. Because we are answering a request we recieved
when being a client ourselves. So, convert the code to use a temporary
client and use the block-write function of the I2C core.

Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Reviewed-by: Asmaa Mnebhi &lt;asmaa@nvidia.com&gt;
Acked-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Message-Id: &lt;20210128085544.7609-1-wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: ipmi: fix off-by-one bounds check that leads to a out-of-bounds write</title>
<updated>2020-01-20T17:01:00+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2020-01-14T14:40:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e0354d147e5889b5faa12e64fa38187aed39aad4'/>
<id>e0354d147e5889b5faa12e64fa38187aed39aad4</id>
<content type='text'>
The end of buffer check is off-by-one since the check is against
an index that is pre-incremented before a store to buf[]. Fix this
adjusting the bounds check appropriately.

Addresses-Coverity: ("Out-of-bounds write")
Fixes: 51bd6f291583 ("Add support for IPMB driver")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Message-Id: &lt;20200114144031.358003-1-colin.king@canonical.com&gt;
Reviewed-by: Asmaa Mnebhi &lt;asmaa@mellanox.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The end of buffer check is off-by-one since the check is against
an index that is pre-incremented before a store to buf[]. Fix this
adjusting the bounds check appropriately.

Addresses-Coverity: ("Out-of-bounds write")
Fixes: 51bd6f291583 ("Add support for IPMB driver")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Message-Id: &lt;20200114144031.358003-1-colin.king@canonical.com&gt;
Reviewed-by: Asmaa Mnebhi &lt;asmaa@mellanox.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: ipmi: Modify max length of IPMB packet</title>
<updated>2019-12-11T19:22:21+00:00</updated>
<author>
<name>Vijay Khemka</name>
<email>vijaykhemka@fb.com</email>
</author>
<published>2019-12-11T19:01:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=380665becdeeb4f455c23582b7f32e6b3cea27d2'/>
<id>380665becdeeb4f455c23582b7f32e6b3cea27d2</id>
<content type='text'>
As per IPMB specification, maximum packet size supported is 255,
modified Max length to 240 from 128 to accommodate more data.

Signed-off-by: Vijay Khemka &lt;vijaykhemka@fb.com&gt;
Message-Id: &lt;20191211190155.1279610-1-vijaykhemka@fb.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As per IPMB specification, maximum packet size supported is 255,
modified Max length to 240 from 128 to accommodate more data.

Signed-off-by: Vijay Khemka &lt;vijaykhemka@fb.com&gt;
Message-Id: &lt;20191211190155.1279610-1-vijaykhemka@fb.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: ipmi: Support raw i2c packet in IPMB</title>
<updated>2019-12-11T19:21:36+00:00</updated>
<author>
<name>Vijay Khemka</name>
<email>vijaykhemka@fb.com</email>
</author>
<published>2019-12-11T18:56:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=042f057fe2dcf38682d85d9f88df00d1a8d45dbd'/>
<id>042f057fe2dcf38682d85d9f88df00d1a8d45dbd</id>
<content type='text'>
Many IPMB devices don't support smbus protocol and this driver
only supports the smbus protocol at the moment.

Added support for the i2c protocol as well. There will be a variable
"i2c-protocol" passed by the device tree or ACPI table which determines
whether the protocol is i2c or smbus.

Signed-off-by: Vijay Khemka &lt;vijaykhemka@fb.com&gt;
Reviewed-by: Asmaa Mnebhi &lt;asmaa@mellanox.com&gt;
Message-Id: &lt;20191211185604.1266063-1-vijaykhemka@fb.com&gt;
[IPMB.txt had moved to driver-api/ipmb.rst, I adjusted]
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Many IPMB devices don't support smbus protocol and this driver
only supports the smbus protocol at the moment.

Added support for the i2c protocol as well. There will be a variable
"i2c-protocol" passed by the device tree or ACPI table which determines
whether the protocol is i2c or smbus.

Signed-off-by: Vijay Khemka &lt;vijaykhemka@fb.com&gt;
Reviewed-by: Asmaa Mnebhi &lt;asmaa@mellanox.com&gt;
Message-Id: &lt;20191211185604.1266063-1-vijaykhemka@fb.com&gt;
[IPMB.txt had moved to driver-api/ipmb.rst, I adjusted]
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: fix ipmb_poll()'s return type</title>
<updated>2019-11-22T19:54:55+00:00</updated>
<author>
<name>Luc Van Oostenryck</name>
<email>luc.vanoostenryck@gmail.com</email>
</author>
<published>2019-11-20T00:07:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8e6a5c833333e14a5023a5dcabb64b7d9e046bc6'/>
<id>8e6a5c833333e14a5023a5dcabb64b7d9e046bc6</id>
<content type='text'>
ipmb_poll() is defined as returning 'unsigned int' but the
.poll method is declared as returning '__poll_t', a bitwise type.

Fix this by using the proper return type and using the EPOLL
constants instead of the POLL ones, as required for __poll_t.

CC: Corey Minyard &lt;minyard@acm.org&gt;
CC: openipmi-developer@lists.sourceforge.net
CC: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Luc Van Oostenryck &lt;luc.vanoostenryck@gmail.com&gt;
Message-Id: &lt;20191120000741.30657-1-luc.vanoostenryck@gmail.com&gt;
Reviewed-by: Asmaa Mnebhi &lt;asmaa@mellanox.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ipmb_poll() is defined as returning 'unsigned int' but the
.poll method is declared as returning '__poll_t', a bitwise type.

Fix this by using the proper return type and using the EPOLL
constants instead of the POLL ones, as required for __poll_t.

CC: Corey Minyard &lt;minyard@acm.org&gt;
CC: openipmi-developer@lists.sourceforge.net
CC: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Luc Van Oostenryck &lt;luc.vanoostenryck@gmail.com&gt;
Message-Id: &lt;20191120000741.30657-1-luc.vanoostenryck@gmail.com&gt;
Reviewed-by: Asmaa Mnebhi &lt;asmaa@mellanox.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: ipmi: Support for both IPMB Req and Resp</title>
<updated>2019-11-07T13:33:03+00:00</updated>
<author>
<name>Vijay Khemka</name>
<email>vijaykhemka@fb.com</email>
</author>
<published>2019-11-06T18:29:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0d8633bf5311177c9a26d75daec677cd87e3261b'/>
<id>0d8633bf5311177c9a26d75daec677cd87e3261b</id>
<content type='text'>
Removed check for request or response in IPMB packets coming from
device as well as from host. Now it supports both way communication
to device via IPMB. Both request and response will be passed to
application.

Signed-off-by: Vijay Khemka &lt;vijaykhemka@fb.com&gt;
Message-Id: &lt;20191106182921.1086795-1-vijaykhemka@fb.com&gt;
Reviewed-by: Asmaa Mnebhi &lt;Asmaa@mellanox.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removed check for request or response in IPMB packets coming from
device as well as from host. Now it supports both way communication
to device via IPMB. Both request and response will be passed to
application.

Signed-off-by: Vijay Khemka &lt;vijaykhemka@fb.com&gt;
Message-Id: &lt;20191106182921.1086795-1-vijaykhemka@fb.com&gt;
Reviewed-by: Asmaa Mnebhi &lt;Asmaa@mellanox.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix uninitialized variable in ipmb_dev_int.c</title>
<updated>2019-07-24T20:53:21+00:00</updated>
<author>
<name>Asmaa Mnebhi</name>
<email>Asmaa@mellanox.com</email>
</author>
<published>2019-07-24T19:32:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=71be7b0e7d4069822c89146daed800686db8f147'/>
<id>71be7b0e7d4069822c89146daed800686db8f147</id>
<content type='text'>
ret at line 112 of ipmb_dev_int.c is uninitialized which
results in a warning during build regressions.
This warning was found by build regression/improvement
testing for v5.3-rc1.

Reported-by: build regression/improvement testing for v5.3-rc1.
Fixes: 51bd6f291583 ("Add support for IPMB driver")
Signed-off-by: Asmaa Mnebhi &lt;Asmaa@mellanox.com&gt;
Message-Id: &lt;571dbb67cf58411d567953d9fb3739eb4789238b.1563996586.git.Asmaa@mellanox.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ret at line 112 of ipmb_dev_int.c is uninitialized which
results in a warning during build regressions.
This warning was found by build regression/improvement
testing for v5.3-rc1.

Reported-by: build regression/improvement testing for v5.3-rc1.
Fixes: 51bd6f291583 ("Add support for IPMB driver")
Signed-off-by: Asmaa Mnebhi &lt;Asmaa@mellanox.com&gt;
Message-Id: &lt;571dbb67cf58411d567953d9fb3739eb4789238b.1563996586.git.Asmaa@mellanox.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix platform_no_drv_owner.cocci warnings</title>
<updated>2019-06-23T21:16:52+00:00</updated>
<author>
<name>kbuild test robot</name>
<email>lkp@intel.com</email>
</author>
<published>2019-06-23T18:50:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a88b6d5668bef303d01b706a35946bfc8e67402c'/>
<id>a88b6d5668bef303d01b706a35946bfc8e67402c</id>
<content type='text'>
drivers/char/ipmi/ipmb_dev_int.c:352:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Fixes: 51bd6f291583 ("Add support for IPMB driver")
CC: Asmaa Mnebhi &lt;Asmaa@mellanox.com&gt;
Signed-off-by: kbuild test robot &lt;lkp@intel.com&gt;
Message-Id: &lt;20190623185044.GA94834@lkp-kbuild21&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
drivers/char/ipmi/ipmb_dev_int.c:352:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Fixes: 51bd6f291583 ("Add support for IPMB driver")
CC: Asmaa Mnebhi &lt;Asmaa@mellanox.com&gt;
Signed-off-by: kbuild test robot &lt;lkp@intel.com&gt;
Message-Id: &lt;20190623185044.GA94834@lkp-kbuild21&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: ipmb: don't allocate i2c_client on stack</title>
<updated>2019-06-19T14:03:55+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2019-06-19T12:50:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=21feadd024e747123bc0aaba8d8cbef2b5eda058'/>
<id>21feadd024e747123bc0aaba8d8cbef2b5eda058</id>
<content type='text'>
The i2c_client structure can be fairly large, which leads to
a warning about possible kernel stack overflow in some
configurations:

drivers/char/ipmi/ipmb_dev_int.c:115:16: error: stack frame size of 1032 bytes in function 'ipmb_write' [-Werror,-Wframe-larger-than=]

There is no real reason to even declare an i2c_client, as we can simply
call i2c_smbus_xfer() directly instead of the i2c_smbus_write_block_data()
wrapper.

Convert the ipmb_write() to use an open-coded i2c_smbus_write_block_data()
here, without changing the behavior.

It seems that there is another problem with this implementation;
when user space passes a length of more than I2C_SMBUS_BLOCK_MAX
bytes, all the rest is silently ignored. This should probably be
addressed in a separate patch, but I don't know what the intended
behavior is here.

Fixes: 51bd6f291583 ("Add support for IPMB driver")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Message-Id: &lt;20190619125045.918700-1-arnd@arndb.de&gt;
Acked-by: Asmaa Mnebhi &lt;Asmaa@mellanox.com&gt;
[Broke up a line &gt;80 characters on i2c_smbus_xfer().]
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The i2c_client structure can be fairly large, which leads to
a warning about possible kernel stack overflow in some
configurations:

drivers/char/ipmi/ipmb_dev_int.c:115:16: error: stack frame size of 1032 bytes in function 'ipmb_write' [-Werror,-Wframe-larger-than=]

There is no real reason to even declare an i2c_client, as we can simply
call i2c_smbus_xfer() directly instead of the i2c_smbus_write_block_data()
wrapper.

Convert the ipmb_write() to use an open-coded i2c_smbus_write_block_data()
here, without changing the behavior.

It seems that there is another problem with this implementation;
when user space passes a length of more than I2C_SMBUS_BLOCK_MAX
bytes, all the rest is silently ignored. This should probably be
addressed in a separate patch, but I don't know what the intended
behavior is here.

Fixes: 51bd6f291583 ("Add support for IPMB driver")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Message-Id: &lt;20190619125045.918700-1-arnd@arndb.de&gt;
Acked-by: Asmaa Mnebhi &lt;Asmaa@mellanox.com&gt;
[Broke up a line &gt;80 characters on i2c_smbus_xfer().]
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
