xref: /freebsd/share/man/man4/mpr.4 (revision 8ccc0d235c226d84112561d453c49904398d085c)
1.\"
2.\" Copyright (c) 2010 Spectra Logic Corporation
3.\" Copyright (c) 2014 LSI Corp
4.\" Copyright (c) 2015-2017 Avago Technologies
5.\" Copyright (c) 2015-2022 Broadcom Ltd.
6.\" All rights reserved.
7.\"
8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright
12.\"    notice, this list of conditions, and the following disclaimer,
13.\"    without modification.
14.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
15.\"    substantially similar to the "NO WARRANTY" disclaimer below
16.\"    ("Disclaimer") and any redistribution must be conditioned upon
17.\"    including a substantially similar Disclaimer requirement for further
18.\"    binary redistribution.
19.\"
20.\" NO WARRANTY
21.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
24.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25.\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
30.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31.\" POSSIBILITY OF SUCH DAMAGES.
32.\"
33.\" mpr driver man page.
34.\"
35.\" Author: Ken Merry <ken@FreeBSD.org>
36.\" Author: Stephen McConnell <slm@FreeBSD.org>
37.\"
38.\" $Id$
39.\"
40.Dd September 28, 2025
41.Dt MPR 4
42.Os
43.Sh NAME
44.Nm mpr
45.Nd "LSI Fusion-MPT 3/3.5 IT/IR 12Gb/s Serial Attached SCSI/SATA/PCIe driver"
46.Sh SYNOPSIS
47To compile this driver into the kernel, place these lines in the kernel
48configuration file:
49.Bd -ragged -offset indent
50.Cd "device pci"
51.Cd "device scbus"
52.Cd "device mpr"
53.Ed
54.Pp
55The driver can be loaded as a module at boot time by placing this line in
56.Xr loader.conf 5 :
57.Bd -literal -offset indent
58mpr_load="YES"
59.Ed
60.Sh DESCRIPTION
61The
62.Nm
63driver provides support for Broadcom Ltd./Avago Tech (LSI)
64Fusion-MPT 3/3.5 IT/IR
65.Tn SAS/PCIe
66controllers.
67.Sh HARDWARE
68The
69.Nm
70driver supports the following SATA/SAS/NVMe RAID controllers:
71.Pp
72.Bl -bullet -compact
73.It
74Broadcom Ltd./Avago Tech (LSI) SAS 3004 (4 Port SAS)
75.It
76Broadcom Ltd./Avago Tech (LSI) SAS 3008 (8 Port SAS)
77.It
78Broadcom Ltd./Avago Tech (LSI) SAS 3108 (8 Port SAS)
79.It
80Broadcom Ltd./Avago Tech (LSI) SAS 3216 (16 Port SAS)
81.It
82Broadcom Ltd./Avago Tech (LSI) SAS 3224 (24 Port SAS)
83.It
84Broadcom Ltd./Avago Tech (LSI) SAS 3316 (16 Port SAS)
85.It
86Broadcom Ltd./Avago Tech (LSI) SAS 3324 (24 Port SAS)
87.It
88Broadcom Ltd./Avago Tech (LSI) SAS 3408 (8 Port SAS/PCIe)
89.It
90Broadcom Ltd./Avago Tech (LSI) SAS 3416 (16 Port SAS/PCIe)
91.It
92Broadcom Ltd./Avago Tech (LSI) SAS 3508 (8 Port SAS/PCIe)
93.It
94Broadcom Ltd./Avago Tech (LSI) SAS 3516 (16 Port SAS/PCIe)
95.It
96Broadcom Ltd./Avago Tech (LSI) SAS 3616 (16 Port SAS/PCIe)
97.It
98Broadcom Ltd./Avago Tech (LSI) SAS 3708 (8 Port SAS/PCIe)
99.It
100Broadcom Ltd./Avago Tech (LSI) SAS 3716 (16 Port SAS/PCIe)
101.It
102Broadcom Ltd./Avago Tech (LSI) SAS 3808 (8 Port SAS/PCIe)
103.It
104Broadcom Ltd./Avago Tech (LSI) SAS 3816 (16 Port SAS/PCIe)
105.It
106Broadcom Ltd./Avago Tech (LSI) SAS 3916 (16 Port SAS/PCIe)
107.El
108.Sh CONFIGURATION
109In all tunable descriptions below, X represents the adapter number.
110.Pp
111To disable MSI interrupts for all
112.Nm
113driver instances, set this tunable value in
114.Xr loader.conf 5 :
115.Bd -literal -offset indent
116hw.mpr.disable_msi=1
117.Ed
118.Pp
119To disable MSI interrupts for a specific
120.Nm
121driver instance, set this tunable value in
122.Xr loader.conf 5 :
123.Bd -literal -offset indent
124dev.mpr.X.disable_msi=1
125.Ed
126.Pp
127To disable MSI-X interrupts for all
128.Nm
129driver instances, set this tunable value in
130.Xr loader.conf 5 :
131.Bd -literal -offset indent
132hw.mpr.disable_msix=1
133.Ed
134.Pp
135To disable MSI-X interrupts for a specific
136.Nm
137driver instance, set this tunable value in
138.Xr loader.conf 5 :
139.Bd -literal -offset indent
140dev.mpr.X.disable_msix=1
141.Ed
142.Pp
143To set the maximum number of DMA chains allocated for all adapters, set
144this tunable in
145.Xr loader.conf 5 :
146.Bd -literal -offset indent
147hw.mpr.max_chains=NNNN
148.Ed
149.Pp
150To set the maximum number of DMA chains allocated for a specific adapter,
151set this tunable in
152.Xr loader.conf 5 :
153.Bd -literal -offset indent
154dev.mpr.X.max_chains=NNNN
155.Ed
156.Pp
157The default max_chains value is 16384.
158.Pp
159The current number of free chain frames is stored in the
160dev.mpr.X.chain_free
161.Xr sysctl 8
162variable.
163.Pp
164The lowest number of free chain frames seen since boot is stored in the
165dev.mpr.X.chain_free_lowwater
166.Xr sysctl 8
167variable.
168.Pp
169The number of times that chain frame allocations have failed since boot is
170stored in the
171dev.mpr.X.chain_alloc_fail
172.Xr sysctl 8
173variable.
174This can be used to determine whether the max_chains tunable should be
175increased to help performance.
176.Pp
177The current number of active I/O commands is shown in the
178dev.mpr.X.io_cmds_active
179.Xr sysctl 8
180variable.
181.Pp
182The current number of free PRP pages is stored in the
183dev.mpr.X.prp_pages_free
184.Xr sysctl 8
185variable.
186PRP pages are used by NVMe devices for I/O transfers, much like Scatter/Gather
187lists.
188.Pp
189The lowest number of free PRP pages seen since boot is stored in the
190dev.mpr.X.prp_pages_free_lowwater
191.Xr sysctl 8
192variable.
193.Pp
194The number of times that PRP page allocations have failed since boot is
195stored in the
196dev.mpr.X.prp_page_alloc_fail
197.Xr sysctl 8
198variable.
199.Pp
200To set the maximum number of pages that will be used per I/O for all adapters,
201set this tunable in
202.Xr loader.conf 5 :
203.Bd -literal -offset indent
204hw.mpr.max_io_pages=NNNN
205.Ed
206.Pp
207To set the maximum number of pages that will be used per I/O for a specific
208adapter, set this tunable in
209.Xr loader.conf 5 :
210.Bd -literal -offset indent
211dev.mpr.X.max_io_pages=NNNN
212.Ed
213.Pp
214The default max_io_pages value is -1, meaning that the maximum I/O size that
215will be used per I/O will be calculated using the IOCFacts values stored in
216the controller.
217The lowest value that the driver will use for max_io_pages is 1, otherwise
218IOCFacts will be used to calculate the maximum I/O size.
219The smaller I/O size calculated from either max_io_pages or IOCFacts will be the
220maximum I/O size used by the driver.
221.Pp
222The highest number of active I/O commands seen since boot is stored in the
223dev.mpr.X.io_cmds_highwater
224.Xr sysctl 8
225variable.
226.Pp
227Devices can be excluded from
228.Nm
229control for all adapters by setting this tunable in
230.Xr loader.conf 5 :
231.Bd -literal -offset indent
232hw.mpr.exclude_ids=Y
233.Ed
234.Pp
235Y represents the target ID of the device.
236If more than one device is to be excluded, target IDs are separated by commas.
237.Pp
238Devices can be excluded from
239.Nm
240control for a specific adapter by setting this tunable in
241.Xr loader.conf 5 :
242.Bd -literal -offset indent
243dev.mpr.X.exclude_ids=Y
244.Ed
245.Pp
246Y represents the target ID of the device.
247If more than one device is to be excluded, target IDs are separated by commas.
248.Pp
249The adapter can issue the
250.Sy StartStopUnit
251SCSI command to SATA direct-access devices during shutdown.
252This allows the device to quiesce powering down.
253To control this feature for all adapters, set the
254.Bd -literal -offset indent
255hw.mpr.enable_ssu
256.Ed
257.Pp
258tunable in
259.Xr loader.conf 5
260to one of these values:
261.Bl -tag -width 6n -offset indent
262.It 0
263Do not send SSU to either HDDs or SSDs.
264.It 1
265Send SSU to SSDs, but not to HDDs.
266This is the default value.
267.It 2
268Send SSU to HDDs, but not to SSDs.
269.It 3
270Send SSU to both HDDs and SSDs.
271.El
272.Pp
273To control this feature for a specific adapter, set this tunable value in
274.Xr loader.conf 5 :
275.Bd -literal -offset indent
276dev.mpr.X.enable_ssu
277.Ed
278.Pp
279The same set of values are valid as when setting this tunable for all adapters.
280.Pp
281SATA disks that take several seconds to spin up and fail the SATA Identify
282command might not be discovered by the driver.
283This problem can sometimes be overcome by increasing the value of the spinup
284wait time in
285.Xr loader.conf 5
286with the
287.Bd -literal -offset indent
288hw.mpr.spinup_wait_time=NNNN
289.Ed
290.Pp
291tunable.
292NNNN represents the number of seconds to wait for SATA devices to spin up when
293the device fails the initial SATA Identify command.
294.Pp
295Spinup wait times can be set for specific adapters in
296.Xr loader.conf 5 :
297with the
298.Bd -literal -offset indent
299dev.mpr.X.spinup_wait_time=NNNN
300.Ed
301.Pp
302tunable.
303NNNN is the number of seconds to wait for SATA devices to spin up when they fail
304the initial SATA Identify command.
305.Pp
306The driver can map devices discovered by the adapter so that target IDs
307corresponding to a specific device persist across resets and reboots.
308In some cases it is possible for devices to lose their mapped IDs due to
309unexpected behavior from certain hardware, such as some types of enclosures.
310To overcome this problem, a tunable is provided that will force the driver to
311map devices using the Phy number associated with the device.
312This feature is not recommended if the topology includes multiple
313enclosures/expanders.
314If multiple enclosures/expanders are present in the topology, Phy numbers are
315repeated, causing all devices at these Phy numbers except the first device to
316fail enumeration.
317To control this feature for all adapters, set the
318.Bd -literal -offset indent
319hw.mpr.use_phy_num
320.Ed
321.Pp
322tunable in
323.Xr loader.conf 5
324to one of these values:
325.Bl -tag -width 6n -offset indent
326.It -1
327Only use Phy numbers to map devices and bypass the driver's mapping logic.
328.It 0
329Never use Phy numbers to map devices.
330.It 1
331Use Phy numbers to map devices, but only if the driver's mapping logic fails
332to map the device that is being enumerated.
333This is the default value.
334.El
335.Pp
336To control this feature for a specific adapter, set this tunable value in
337.Xr loader.conf 5 :
338.Bd -literal -offset indent
339dev.mpr.X.use_phy_num
340.Ed
341.Pp
342The same set of values are valid as when setting this tunable for all adapters.
343.Sh DEBUGGING
344Driver diagnostic printing is controlled in
345.Xr loader.conf 5
346by using the global
347.Va hw.mpr.debug_level
348and per-device
349.Va dev.mpr.X.debug_level
350tunables.
351One can alter the debug level for any adapter at run-time using the
352.Xr sysctl 8
353variable
354.Va dev.mpr.X.debug_level .
355.Pp
356All
357.Va debug_level
358variables can be named by either an integer value or a text string.
359Multiple values can be specified together by either ORing the
360integer values or by providing a comma-separated list of names.
361A text string prefixed by
362.Qq +
363adds the specified debug levels to the existing set, while the prefix
364.Qq -
365removes them from the existing set.
366The current
367.Va debug_level
368status is reported in both formats for convenience.
369The following levels are available:
370.Bl -column "FlagXX" "NameXXXX" "Description" -offset indent
371.It Em Flag Ta Em Name Ta Em Description
372.It 0x0001 Ta info Ta Basic information (enabled by default)
373.It 0x0002 Ta fault Ta Driver faults (enabled by default)
374.It 0x0004 Ta event Ta Controller events
375.It 0x0008 Ta log Ta Logging data from controller
376.It 0x0010 Ta recovery Ta Tracing of recovery operations
377.It 0x0020 Ta error Ta Parameter errors and programming bugs
378.It 0x0040 Ta init Ta System initialization operations
379.It 0x0080 Ta xinfo Ta More detailed information
380.It 0x0100 Ta user Ta Tracing of user-generated commands (IOCTL)
381.It 0x0200 Ta mapping Ta Tracing of device mapping
382.It 0x0400 Ta trace Ta Tracing through driver functions
383.El
384.Sh SEE ALSO
385.Xr cam 4 ,
386.Xr cd 4 ,
387.Xr ch 4 ,
388.Xr da 4 ,
389.Xr mps 4 ,
390.Xr mpt 4 ,
391.Xr pci 4 ,
392.Xr sa 4 ,
393.Xr scsi 4 ,
394.Xr targ 4 ,
395.Xr loader.conf 5 ,
396.Xr mprutil 8 ,
397.Xr sysctl 8
398.Sh HISTORY
399The
400.Nm
401driver first appeared in
402.Fx 9.3 .
403.Sh AUTHORS
404The
405.Nm
406driver was originally written by
407.An -nosplit
408.An Scott Long Aq Mt scottl@FreeBSD.org .
409It has been improved and tested by LSI Corporation,
410Avago Technologies (formerly LSI), and Broadcom Ltd. (formerly Avago).
411.Pp
412This manual page was written by
413.An Ken Merry Aq Mt ken@FreeBSD.org
414with additional input from
415.An Stephen McConnell Aq Mt slm@FreeBSD.org .
416