<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/char/ipmi, branch master</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>ipmi:ssif: NULL thread on error</title>
<updated>2026-04-28T17:59:15+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>corey@minyard.net</email>
</author>
<published>2026-04-21T11:50:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a8aebe93a4938c0ca1941eeaae821738f869be3d'/>
<id>a8aebe93a4938c0ca1941eeaae821738f869be3d</id>
<content type='text'>
Cleanup code was checking the thread for NULL, but it was possibly
a PTR_ERR() in one spot.

Spotted with static analysis.

Link: https://sourceforge.net/p/openipmi/mailman/message/59324676/
Fixes: 75c486cb1bca ("ipmi:ssif: Clean up kthread on errors")
Cc: &lt;stable@vger.kernel.org&gt; # 91eb7ec72612: ipmi:ssif: Remove unnecessary indention
Cc: stable@vger.kernel.org
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cleanup code was checking the thread for NULL, but it was possibly
a PTR_ERR() in one spot.

Spotted with static analysis.

Link: https://sourceforge.net/p/openipmi/mailman/message/59324676/
Fixes: 75c486cb1bca ("ipmi:ssif: Clean up kthread on errors")
Cc: &lt;stable@vger.kernel.org&gt; # 91eb7ec72612: ipmi:ssif: Remove unnecessary indention
Cc: stable@vger.kernel.org
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi:si: Return state to normal if message allocation fails</title>
<updated>2026-04-28T17:59:15+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>corey@minyard.net</email>
</author>
<published>2026-04-20T18:02:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=09dd798270ff582d7309f285d4aaf5dbebae01cb'/>
<id>09dd798270ff582d7309f285d4aaf5dbebae01cb</id>
<content type='text'>
There were places where nothing would get started if a message
allocation failed, so the driver needs to return to normal state.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There were places where nothing would get started if a message
allocation failed, so the driver needs to return to normal state.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: Add limits to event and receive message requests</title>
<updated>2026-04-28T17:59:08+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>corey@minyard.net</email>
</author>
<published>2026-04-20T17:39:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c4cca236968683eb0d59abfb12d5c7e4d8514227'/>
<id>c4cca236968683eb0d59abfb12d5c7e4d8514227</id>
<content type='text'>
The driver would just fetch events and receive messages until the
BMC said it was done.  To avoid issues with BMCs that never say they are
done, add a limit of 10 fetches at a time.

In addition, an si interface has an attn state it can return from the
hardware which is supposed to cause a flag fetch to see if the driver
needs to fetch events or message or a few other things.  If the attn
bit gets stuck, it's a similar problem.  So allow messages in between
flag fetches so the driver itself doesn't get stuck.

This is a more general fix than the previous fix for the specific bad
BMC, but should fix the more general issue of a BMC that won't stop
saying it has data.

This has been there from the beginning of the driver.  It's not a bug
per-se, but it is accounting for bugs in BMCs.

Reported-by: Matt Fleming &lt;mfleming@cloudflare.com&gt;
Closes: https://lore.kernel.org/lkml/20260415115930.3428942-1-matt@readmodwrite.com/
Fixes: &lt;1da177e4c3f4&gt; ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The driver would just fetch events and receive messages until the
BMC said it was done.  To avoid issues with BMCs that never say they are
done, add a limit of 10 fetches at a time.

In addition, an si interface has an attn state it can return from the
hardware which is supposed to cause a flag fetch to see if the driver
needs to fetch events or message or a few other things.  If the attn
bit gets stuck, it's a similar problem.  So allow messages in between
flag fetches so the driver itself doesn't get stuck.

This is a more general fix than the previous fix for the specific bad
BMC, but should fix the more general issue of a BMC that won't stop
saying it has data.

This has been there from the beginning of the driver.  It's not a bug
per-se, but it is accounting for bugs in BMCs.

Reported-by: Matt Fleming &lt;mfleming@cloudflare.com&gt;
Closes: https://lore.kernel.org/lkml/20260415115930.3428942-1-matt@readmodwrite.com/
Fixes: &lt;1da177e4c3f4&gt; ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: Check event message buffer response for bad data</title>
<updated>2026-04-21T12:29:04+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>corey@minyard.net</email>
</author>
<published>2026-04-20T17:50:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=36920f30e78e69df01f9691c470b6f3ba8aebf98'/>
<id>36920f30e78e69df01f9691c470b6f3ba8aebf98</id>
<content type='text'>
The event message buffer response data size got checked later when
processing, but check it right after the response comes back.  It
appears some BMCs may return an empty message instead of an error
when fetching events.

There are apparently some new BMCs that make this error, so we need to
compensate.

Reported-by: Matt Fleming &lt;mfleming@cloudflare.com&gt;
Closes: https://lore.kernel.org/lkml/20260415115930.3428942-1-matt@readmodwrite.com/
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The event message buffer response data size got checked later when
processing, but check it right after the response comes back.  It
appears some BMCs may return an empty message instead of an error
when fetching events.

There are apparently some new BMCs that make this error, so we need to
compensate.

Reported-by: Matt Fleming &lt;mfleming@cloudflare.com&gt;
Closes: https://lore.kernel.org/lkml/20260415115930.3428942-1-matt@readmodwrite.com/
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi:ssif: Clean up kthread on errors</title>
<updated>2026-04-17T11:47:40+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>corey@minyard.net</email>
</author>
<published>2026-04-13T13:00:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=75c486cb1bcaa1a3ec3a6438498176a3a4998ae4'/>
<id>75c486cb1bcaa1a3ec3a6438498176a3a4998ae4</id>
<content type='text'>
If an error occurs after the ssif kthread is created, but before the
main IPMI code starts the ssif interface, the ssif kthread will not
be stopped.

So make sure the kthread is stopped on an error condition if it is
running.

Fixes: 259307074bfc ("ipmi: Add SMBus interface driver (SSIF)")
Reported-by: Li Xiao &lt;&lt;252270051@hdu.edu.cn&gt;
Cc: stable@vger.kernel.org
Reviewed-by: Li Xiao &lt;252270051@hdu.edu.cn&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If an error occurs after the ssif kthread is created, but before the
main IPMI code starts the ssif interface, the ssif kthread will not
be stopped.

So make sure the kthread is stopped on an error condition if it is
running.

Fixes: 259307074bfc ("ipmi: Add SMBus interface driver (SSIF)")
Reported-by: Li Xiao &lt;&lt;252270051@hdu.edu.cn&gt;
Cc: stable@vger.kernel.org
Reviewed-by: Li Xiao &lt;252270051@hdu.edu.cn&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi:ssif: Remove unnecessary indention</title>
<updated>2026-04-13T12:09:15+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>corey@minyard.net</email>
</author>
<published>2026-04-13T12:09:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=91eb7ec7261254b6875909df767185838598e21e'/>
<id>91eb7ec7261254b6875909df767185838598e21e</id>
<content type='text'>
A section was in {} that didn't need to be, move the variable
definition to the top and set th eindentino properly.

Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A section was in {} that didn't need to be, move the variable
definition to the top and set th eindentino properly.

Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: ssif_bmc: Fix KUnit test link failure when KUNIT=m</title>
<updated>2026-04-07T12:33:23+00:00</updated>
<author>
<name>Jian Zhang</name>
<email>zhangjian.3032@bytedance.com</email>
</author>
<published>2026-04-07T09:46:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=93b5d21e8b5cbdc3e439b94feee9b013e8170905'/>
<id>93b5d21e8b5cbdc3e439b94feee9b013e8170905</id>
<content type='text'>
Building with CONFIG_KUNIT=m and CONFIG_SSIF_IPMI_BMC_KUNIT_TEST=y
results in link errors such as:

  undefined reference to `kunit_binary_assert_format'
  undefined reference to `__kunit_do_failed_assertion'

This happens because the test code is built-in while the KUnit core
is built as a module, so the required KUnit symbols are not available
at link time.

Fix this by requiring KUNIT to be built-in when enabling
SSIF_IPMI_BMC_KUNIT_TEST.

Signed-off-by: Jian Zhang &lt;zhangjian.3032@bytedance.com&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202604071448.zUBjPYPu-lkp@intel.com/
Message-ID: &lt;20260407094647.356661-1-zhangjian.3032@bytedance.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Building with CONFIG_KUNIT=m and CONFIG_SSIF_IPMI_BMC_KUNIT_TEST=y
results in link errors such as:

  undefined reference to `kunit_binary_assert_format'
  undefined reference to `__kunit_do_failed_assertion'

This happens because the test code is built-in while the KUnit core
is built as a module, so the required KUnit symbols are not available
at link time.

Fix this by requiring KUNIT to be built-in when enabling
SSIF_IPMI_BMC_KUNIT_TEST.

Signed-off-by: Jian Zhang &lt;zhangjian.3032@bytedance.com&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202604071448.zUBjPYPu-lkp@intel.com/
Message-ID: &lt;20260407094647.356661-1-zhangjian.3032@bytedance.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: ssif_bmc: add unit test for state machine</title>
<updated>2026-04-03T15:23:42+00:00</updated>
<author>
<name>Jian Zhang</name>
<email>zhangjian.3032@bytedance.com</email>
</author>
<published>2026-04-03T14:39:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d4464694f2a409fadbe17a70202242ff6b72ee30'/>
<id>d4464694f2a409fadbe17a70202242ff6b72ee30</id>
<content type='text'>
Add some unit test for state machine when in SSIF_ABORTING state.

Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver")
Signed-off-by: Jian Zhang &lt;zhangjian.3032@bytedance.com&gt;
Message-ID: &lt;20260403143939.434017-1-zhangjian.3032@bytedance.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add some unit test for state machine when in SSIF_ABORTING state.

Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver")
Signed-off-by: Jian Zhang &lt;zhangjian.3032@bytedance.com&gt;
Message-ID: &lt;20260403143939.434017-1-zhangjian.3032@bytedance.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: ssif_bmc: change log level to dbg in irq callback</title>
<updated>2026-04-03T12:50:04+00:00</updated>
<author>
<name>Jian Zhang</name>
<email>zhangjian.3032@bytedance.com</email>
</author>
<published>2026-04-03T09:06:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c9c99b7b7051eb7121b3224bfce181fb023b0269'/>
<id>c9c99b7b7051eb7121b3224bfce181fb023b0269</id>
<content type='text'>
Long-running tests indicate that this logging can occasionally disrupt
timing and lead to request/response corruption.

Irq handler need to be executed as fast as possible,
most I2C slave IRQ implementations are byte-level, logging here
can significantly affect transfer behavior and timing. It is recommended
to use dev_dbg() for these messages.

Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver")
Signed-off-by: Jian Zhang &lt;zhangjian.3032@bytedance.com&gt;
Message-ID: &lt;20260403090603.3988423-4-zhangjian.3032@bytedance.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Long-running tests indicate that this logging can occasionally disrupt
timing and lead to request/response corruption.

Irq handler need to be executed as fast as possible,
most I2C slave IRQ implementations are byte-level, logging here
can significantly affect transfer behavior and timing. It is recommended
to use dev_dbg() for these messages.

Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver")
Signed-off-by: Jian Zhang &lt;zhangjian.3032@bytedance.com&gt;
Message-ID: &lt;20260403090603.3988423-4-zhangjian.3032@bytedance.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: ssif_bmc: fix message desynchronization after truncated response</title>
<updated>2026-04-03T12:49:58+00:00</updated>
<author>
<name>Jian Zhang</name>
<email>zhangjian.3032@bytedance.com</email>
</author>
<published>2026-04-03T09:06:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1d38e849adb6851ee280aa1a1d687b2181549a66'/>
<id>1d38e849adb6851ee280aa1a1d687b2181549a66</id>
<content type='text'>
A truncated response, caused by host power-off, or other conditions,
can lead to message desynchronization.

Raw trace data (STOP loss scenario, add state transition comment):

1. T-1: Read response phase (SSIF_RES_SENDING)
8271.955342  WR_RCV [03]                          &lt;- Read polling cmd
8271.955348  RD_REQ [04]  &lt;== SSIF_RES_SENDING    &lt;- start sending response
8271.955436  RD_PRO [b4]
8271.955527  RD_PRO [00]
8271.955618  RD_PRO [c1]
8271.955707  RD_PRO [00]
8271.955814  RD_PRO [ad]  &lt;== SSIF_RES_SENDING     &lt;- last byte
	&lt;- !! STOP lost (truncated response)

2. T: New Write request arrives, BMC still in SSIF_RES_SENDING
8271.967973  WR_REQ []    &lt;== SSIF_RES_SENDING &gt;&gt; SSIF_ABORTING  &lt;- log: unexpected WR_REQ in RES_SENDING
8271.968447  WR_RCV [02]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.968452  WR_RCV [02]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.968454  WR_RCV [18]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.968456  WR_RCV [01]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.968458  WR_RCV [66]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.978714  STOP []      &lt;== SSIF_ABORTING &gt;&gt; SSIF_READY  &lt;- log: unexpected SLAVE STOP in state=SSIF_ABORTING

3. T+1: Next Read polling, treated as a fresh transaction
8271.979125  WR_REQ []    &lt;== SSIF_READY &gt;&gt; SSIF_START
8271.979326  WR_RCV [03]  &lt;== SSIF_START &gt;&gt; SSIF_SMBUS_CMD        &lt;- smbus_cmd=0x03
8271.979331  RD_REQ [04]  &lt;== SSIF_RES_SENDING      &lt;- sending response
8271.979427  RD_PRO [b4]                            &lt;- !! this is T's stale response -&gt; desynchronization

When in SSIF_ABORTING state, a newly arrived command should still be
handled to avoid dropping the request or causing message
desynchronization.

Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver")
Signed-off-by: Jian Zhang &lt;zhangjian.3032@bytedance.com&gt;
Message-ID: &lt;20260403090603.3988423-3-zhangjian.3032@bytedance.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A truncated response, caused by host power-off, or other conditions,
can lead to message desynchronization.

Raw trace data (STOP loss scenario, add state transition comment):

1. T-1: Read response phase (SSIF_RES_SENDING)
8271.955342  WR_RCV [03]                          &lt;- Read polling cmd
8271.955348  RD_REQ [04]  &lt;== SSIF_RES_SENDING    &lt;- start sending response
8271.955436  RD_PRO [b4]
8271.955527  RD_PRO [00]
8271.955618  RD_PRO [c1]
8271.955707  RD_PRO [00]
8271.955814  RD_PRO [ad]  &lt;== SSIF_RES_SENDING     &lt;- last byte
	&lt;- !! STOP lost (truncated response)

2. T: New Write request arrives, BMC still in SSIF_RES_SENDING
8271.967973  WR_REQ []    &lt;== SSIF_RES_SENDING &gt;&gt; SSIF_ABORTING  &lt;- log: unexpected WR_REQ in RES_SENDING
8271.968447  WR_RCV [02]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.968452  WR_RCV [02]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.968454  WR_RCV [18]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.968456  WR_RCV [01]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.968458  WR_RCV [66]  &lt;== SSIF_ABORTING  &lt;- do nothing
8271.978714  STOP []      &lt;== SSIF_ABORTING &gt;&gt; SSIF_READY  &lt;- log: unexpected SLAVE STOP in state=SSIF_ABORTING

3. T+1: Next Read polling, treated as a fresh transaction
8271.979125  WR_REQ []    &lt;== SSIF_READY &gt;&gt; SSIF_START
8271.979326  WR_RCV [03]  &lt;== SSIF_START &gt;&gt; SSIF_SMBUS_CMD        &lt;- smbus_cmd=0x03
8271.979331  RD_REQ [04]  &lt;== SSIF_RES_SENDING      &lt;- sending response
8271.979427  RD_PRO [b4]                            &lt;- !! this is T's stale response -&gt; desynchronization

When in SSIF_ABORTING state, a newly arrived command should still be
handled to avoid dropping the request or causing message
desynchronization.

Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver")
Signed-off-by: Jian Zhang &lt;zhangjian.3032@bytedance.com&gt;
Message-ID: &lt;20260403090603.3988423-3-zhangjian.3032@bytedance.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
