<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/mpr, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>chore: replace {0, 0} with {DEV,KOBJ}METHOD_END</title>
<updated>2026-02-25T05:59:34+00:00</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2026-02-21T06:14:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0fc6c3f731a2cca3120798806c330a3081c9424b'/>
<id>0fc6c3f731a2cca3120798806c330a3081c9424b</id>
<content type='text'>
Both of the aforementioned macros have been present in FreeBSD
for well over a decade: 2009 for `KOBJMETHOD_END`; 2011 for
`DEVMETHOD_END`.

Adapt all hardcoded references of `{0, 0}` with `DEVMETHOD_END`
and `KOBJMETHOD_END` as appropriate. This helps ensure that
future adaptations to drivers following patterns documented
in driver(9) can be made more easily/without issue.

MFC after:	1 week
Differential Revision:	 https://reviews.freebsd.org/D55414
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both of the aforementioned macros have been present in FreeBSD
for well over a decade: 2009 for `KOBJMETHOD_END`; 2011 for
`DEVMETHOD_END`.

Adapt all hardcoded references of `{0, 0}` with `DEVMETHOD_END`
and `KOBJMETHOD_END` as appropriate. This helps ensure that
future adaptations to drivers following patterns documented
in driver(9) can be made more easily/without issue.

MFC after:	1 week
Differential Revision:	 https://reviews.freebsd.org/D55414
</pre>
</div>
</content>
</entry>
<entry>
<title>cam/scsi: Restore scsi_start_stop() and add scsi_start_stop_pc()</title>
<updated>2026-01-26T06:35:31+00:00</updated>
<author>
<name>Jaeyoon Choi</name>
<email>jaeyoon@FreeBSD.org</email>
</author>
<published>2026-01-26T06:29:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8ef8c6abfadfc9eb0465ce57c6b09ca310415bdd'/>
<id>8ef8c6abfadfc9eb0465ce57c6b09ca310415bdd</id>
<content type='text'>
Revert the argument change that broke libcam in 8c35de49 and move
power_condition support to scsi_start_stop_pc().

Reported by:		imp
Reviewed By:		#cam, imp (mentor)
Sponsored by:           Samsung Electronics
Differential Revision:	https://reviews.freebsd.org/D54822
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Revert the argument change that broke libcam in 8c35de49 and move
power_condition support to scsi_start_stop_pc().

Reported by:		imp
Reviewed By:		#cam, imp (mentor)
Sponsored by:           Samsung Electronics
Differential Revision:	https://reviews.freebsd.org/D54822
</pre>
</div>
</content>
</entry>
<entry>
<title>mpr: Add a probe on completion</title>
<updated>2026-01-09T06:03:38+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2026-01-06T05:13:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0e80273f0d864d28bd3c3ae9dafd58e637743910'/>
<id>0e80273f0d864d28bd3c3ae9dafd58e637743910</id>
<content type='text'>
cam::mpr:complete(union ccb *, struct mpr_command *, u_int, u32);
    Where u_int is scsas-&gt;flags u32 is the device_info.

This can't be done as an fbt because the data needed for it isn't
present out a function boundary.

Sponsored by:		Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
cam::mpr:complete(union ccb *, struct mpr_command *, u_int, u32);
    Where u_int is scsas-&gt;flags u32 is the device_info.

This can't be done as an fbt because the data needed for it isn't
present out a function boundary.

Sponsored by:		Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>mps/mpr: Remove bogus sys/cdefs.h includes</title>
<updated>2026-01-09T05:54:44+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2026-01-09T05:48:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d650b2ceda4641475e90ba1f6d349eac98aaa963'/>
<id>d650b2ceda4641475e90ba1f6d349eac98aaa963</id>
<content type='text'>
These are left over from the $FreeBSD$ stuff.

Sponsored by:		Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These are left over from the $FreeBSD$ stuff.

Sponsored by:		Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>mpr: Partially revert 332096ebb638</title>
<updated>2025-12-10T21:09:07+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2025-12-10T21:06:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=84d198e137a59a17c08896333eaa9b318f4b1e1f'/>
<id>84d198e137a59a17c08896333eaa9b318f4b1e1f</id>
<content type='text'>
These were a doodle that escaped into my staging tree. Remove them.

Sponsored by:		Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These were a doodle that escaped into my staging tree. Remove them.

Sponsored by:		Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>kboot: Explicitly use host:/proc</title>
<updated>2025-12-10T19:03:47+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2025-12-10T12:36:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=332096ebb6380ae65829018b4e1d611cd68dcc33'/>
<id>332096ebb6380ae65829018b4e1d611cd68dcc33</id>
<content type='text'>
When looking for the boot_params symbol we need to get the UEFI memory
map, use host: prefix. The short-circuit we have for this only works
when we have a filesystem. During the earliest parts of boot, we can
sometimes not have this yet, so making this explicit allows these
environments to function.

It's always in the host path. Print better
error messages, and add newlines in two palces.

Sponsored by:		Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When looking for the boot_params symbol we need to get the UEFI memory
map, use host: prefix. The short-circuit we have for this only works
when we have a filesystem. During the earliest parts of boot, we can
sometimes not have this yet, so making this explicit allows these
environments to function.

It's always in the host path. Print better
error messages, and add newlines in two palces.

Sponsored by:		Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>cam/scsi: Add power condition support to START STOP UNIT</title>
<updated>2025-12-01T04:40:52+00:00</updated>
<author>
<name>Jaeyoon Choi</name>
<email>jaeyoon@FreeBSD.org</email>
</author>
<published>2025-12-01T04:39:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8c35de4982d855950a900483513f341643f6158f'/>
<id>8c35de4982d855950a900483513f341643f6158f</id>
<content type='text'>
This patch adds a power_condition parameter to the
scsi_start_stop() function and sets the power condition via SSU.

Reviewed by:		imp (mentor)
Sponsored by:           Samsung Electronic
Differential Revision:	https://reviews.freebsd.org/D53922
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a power_condition parameter to the
scsi_start_stop() function and sets the power condition via SSU.

Reviewed by:		imp (mentor)
Sponsored by:           Samsung Electronic
Differential Revision:	https://reviews.freebsd.org/D53922
</pre>
</div>
</content>
</entry>
<entry>
<title>mpr: Add workaround for too few slots being automatically scanned</title>
<updated>2025-08-31T19:01:09+00:00</updated>
<author>
<name>Peter Eriksson</name>
<email>pen@lysator.liu.se</email>
</author>
<published>2025-08-31T18:58:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=004ce88ad1efd42a1d7d5692849b4aa6906178fc'/>
<id>004ce88ad1efd42a1d7d5692849b4aa6906178fc</id>
<content type='text'>
This patch adds a /boot/loader.conf setting that makes it possibly to
override the detected number of slots in storage enclosures. Some (yes
I'm looking at you HPE D6020!) reports less available slots that there
actually are (the D6020 seems to report 18 but actually has 35 per
drawer). This causes the mpr driver to have problems detecting/managing
all drives in a multienclosure setting. For the D6020 this occurs when
connecting two or more fully equipped (140 drives) enclosures to one
controller...

This problem can be "fixed" by adding the following to /boot/loader.conf
and rebooting:
    hw.mpr.encl_min_slots="35"

Note: I (Warner) don't have this hardware to see if there's some way to
fix the detection, so I'm committing this as a stop-gap. It's a no-op if
no tunable is set.

PR: 271238
Reivewed by: imp
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a /boot/loader.conf setting that makes it possibly to
override the detected number of slots in storage enclosures. Some (yes
I'm looking at you HPE D6020!) reports less available slots that there
actually are (the D6020 seems to report 18 but actually has 35 per
drawer). This causes the mpr driver to have problems detecting/managing
all drives in a multienclosure setting. For the D6020 this occurs when
connecting two or more fully equipped (140 drives) enclosures to one
controller...

This problem can be "fixed" by adding the following to /boot/loader.conf
and rebooting:
    hw.mpr.encl_min_slots="35"

Note: I (Warner) don't have this hardware to see if there's some way to
fix the detection, so I'm committing this as a stop-gap. It's a no-op if
no tunable is set.

PR: 271238
Reivewed by: imp
</pre>
</div>
</content>
</entry>
<entry>
<title>machine/stdarg.h -&gt; sys/stdarg.h</title>
<updated>2025-06-11T16:39:02+00:00</updated>
<author>
<name>Brooks Davis</name>
<email>brooks@FreeBSD.org</email>
</author>
<published>2025-06-11T16:39:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e453e498cbb88570a3ff7b3679de65c88707da95'/>
<id>e453e498cbb88570a3ff7b3679de65c88707da95</id>
<content type='text'>
Switch to using sys/stdarg.h for va_list type and va_* builtins.

Make an attempt to insert the include in a sensible place.  Where
style(9) was followed this is easy, where it was ignored, aim for the
first block of sys/*.h headers and don't get too fussy or try to fix
other style bugs.

Reviewed by:	imp
Exp-run by:	antoine (PR 286274)
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1595
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Switch to using sys/stdarg.h for va_list type and va_* builtins.

Make an attempt to insert the include in a sensible place.  Where
style(9) was followed this is easy, where it was ignored, aim for the
first block of sys/*.h headers and don't get too fussy or try to fix
other style bugs.

Reviewed by:	imp
Exp-run by:	antoine (PR 286274)
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1595
</pre>
</div>
</content>
</entry>
<entry>
<title>mps/mpr: Add workaround for firmware not responding to IOC_FACTS or IOC_INIT</title>
<updated>2024-10-13T21:38:01+00:00</updated>
<author>
<name>prateek sethi</name>
<email>prateekrootkey@gmail.com</email>
</author>
<published>2024-10-13T18:38:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c0e0e530ced057502f51d7a6086857305e08fae0'/>
<id>c0e0e530ced057502f51d7a6086857305e08fae0</id>
<content type='text'>
Sometimes, especially with older firmware, mps(4) would have trouble
initializing the card in one of these two steps. Add in a retry after a
short delay. Sean Bruno and Stephen McConnell thought this was OK in the
bug discussions, but never committed it.  Steve indicated the delay
might not be necessary, but the OP clearly needed to make it longer to
make things work. I've kept the delay, and added the suggested comment.

Ported the iocfacts part to mpr as well, since we see similar errors
about once every month or two over a few thousand controllers at
work. We've not seen it with IOC_INIT as far back as I can query the
error log database, so I didn't port that forward. We'll see if this
helps, but won't know for sure until next year (so I'm committing it now
since it won't hurt and might help). We usually see this failure in
connection with complicated recovery operations with a drive that's
failing, though, at least in the last year's worth of failures. It's
not clear this is the same as OP or not.

PR: 212841
Sponsored by: Netflix
Co-authored-by: imp
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sometimes, especially with older firmware, mps(4) would have trouble
initializing the card in one of these two steps. Add in a retry after a
short delay. Sean Bruno and Stephen McConnell thought this was OK in the
bug discussions, but never committed it.  Steve indicated the delay
might not be necessary, but the OP clearly needed to make it longer to
make things work. I've kept the delay, and added the suggested comment.

Ported the iocfacts part to mpr as well, since we see similar errors
about once every month or two over a few thousand controllers at
work. We've not seen it with IOC_INIT as far back as I can query the
error log database, so I didn't port that forward. We'll see if this
helps, but won't know for sure until next year (so I'm committing it now
since it won't hurt and might help). We usually see this failure in
connection with complicated recovery operations with a drive that's
failing, though, at least in the last year's worth of failures. It's
not clear this is the same as OP or not.

PR: 212841
Sponsored by: Netflix
Co-authored-by: imp
</pre>
</div>
</content>
</entry>
</feed>
