xref: /freebsd/share/man/man4/mps.4 (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
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-2017 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.\" mps driver man page.
34.\"
35.\" Author: Ken Merry <ken@FreeBSD.org>
36.\" Author: Stephen McConnell <slm@FreeBSD.org>
37.\"
38.\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#6 $
39.\"
40.Dd June 1, 2019
41.Dt MPS 4
42.Os
43.Sh NAME
44.Nm mps
45.Nd "LSI Fusion-MPT 2 IT/IR 6Gb/s Serial Attached SCSI/SATA 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 mps"
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
58mps_load="YES"
59.Ed
60.Sh DESCRIPTION
61The
62.Nm
63driver provides support for Broadcom Ltd./Avago Tech (LSI)
64Fusion-MPT 2 IT/IR
65.Tn SAS
66controllers and WarpDrive solid state storage cards.
67.Sh HARDWARE
68These controllers are supported by the
69.Nm
70driver:
71.Pp
72.Bl -bullet -compact
73.It
74Broadcom Ltd./Avago Tech (LSI) SAS 2004 (4 Port SAS)
75.It
76Broadcom Ltd./Avago Tech (LSI) SAS 2008 (8 Port SAS)
77.It
78Broadcom Ltd./Avago Tech (LSI) SAS 2108 (8 Port SAS)
79.It
80Broadcom Ltd./Avago Tech (LSI) SAS 2116 (16 Port SAS)
81.It
82Broadcom Ltd./Avago Tech (LSI) SAS 2208 (8 Port SAS)
83.It
84Broadcom Ltd./Avago Tech (LSI) SAS 2308 (8 Port SAS)
85.It
86Broadcom Ltd./Avago Tech (LSI) SSS6200 Solid State Storage
87.It
88Intel Integrated RAID Module RMS25JB040
89.It
90Intel Integrated RAID Module RMS25JB080
91.It
92Intel Integrated RAID Module RMS25KB040
93.It
94Intel Integrated RAID Module RMS25KB080
95.El
96.Sh CONFIGURATION
97In all tunable descriptions below, X represents the adapter number.
98.Pp
99To disable MSI interrupts for all
100.Nm
101driver instances, set this tunable value in
102.Xr loader.conf 5 :
103.Bd -literal -offset indent
104hw.mps.disable_msi=1
105.Ed
106.Pp
107To disable MSI interrupts for a specific
108.Nm
109driver instance, set this tunable value in
110.Xr loader.conf 5 :
111.Bd -literal -offset indent
112dev.mps.X.disable_msi=1
113.Ed
114.Pp
115To disable MSI-X interrupts for all
116.Nm
117driver instances, set this tunable value in
118.Xr loader.conf 5 :
119.Bd -literal -offset indent
120hw.mps.disable_msix=1
121.Ed
122.Pp
123To disable MSI-X interrupts for a specific
124.Nm
125driver instance, set this tunable value in
126.Xr loader.conf 5 :
127.Bd -literal -offset indent
128dev.mps.X.disable_msix=1
129.Ed
130.Pp
131To set the maximum number of DMA chains allocated for all adapters, set this
132tunable in
133.Xr loader.conf 5 :
134.Bd -literal -offset indent
135hw.mps.max_chains=NNNN
136.Ed
137.Pp
138To set the maximum number of DMA chains allocated for a specific adapter,
139set this tunable in
140.Xr loader.conf 5 :
141.Bd -literal -offset indent
142dev.mps.X.max_chains=NNNN
143.Ed
144.Pp
145The default max_chains value is 16384.
146.Pp
147The current number of free chain frames is stored in the
148dev.mps.X.chain_free
149.Xr sysctl 8
150variable.
151.Pp
152The lowest number of free chain frames seen since boot is stored in the
153dev.mps.X.chain_free_lowwater
154.Xr sysctl 8
155variable.
156.Pp
157The number of times that chain frame allocations have failed since boot is
158stored in the
159dev.mps.X.chain_alloc_fail
160.Xr sysctl 8
161variable.
162This can be used to determine whether the max_chains tunable should be
163increased to help performance.
164.Pp
165The current number of active I/O commands is shown in the
166dev.mps.X.io_cmds_active
167.Xr sysctl 8
168variable.
169.Pp
170To set the maximum number of pages that will be used per I/O for all adapters,
171set this tunable in
172.Xr loader.conf 5 :
173.Bd -literal -offset indent
174hw.mps.max_io_pages=NNNN
175.Ed
176.Pp
177To set the maximum number of pages that will be used per I/O for a specific
178adapter, set this tunable in
179.Xr loader.conf 5 :
180.Bd -literal -offset indent
181dev.mps.X.max_io_pages=NNNN
182.Ed
183.Pp
184The default max_io_pages value is -1, meaning that the maximum I/O size that
185will be used per I/O will be calculated using the IOCFacts values stored in
186the controller.
187The lowest value that the driver will use for max_io_pages is 1, otherwise
188IOCFacts will be used to calculate the maximum I/O size.
189The smaller I/O size calculated from either max_io_pages or IOCFacts will be the
190maximum I/O size used by the driver.
191.Pp
192The highest number of active I/O commands seen since boot is stored in the
193dev.mps.X.io_cmds_highwater
194.Xr sysctl 8
195variable.
196.Pp
197Devices can be excluded from
198.Nm
199control for all adapters by setting this tunable in
200.Xr loader.conf 5 :
201.Bd -literal -offset indent
202hw.mps.exclude_ids=Y
203.Ed
204.Pp
205Y represents the target ID of the device.
206If more than one device is to be excluded, target IDs are separated by commas.
207.Pp
208Devices can be excluded from
209.Nm
210control for a specific adapter by setting this tunable in
211.Xr loader.conf 5 :
212.Bd -literal -offset indent
213dev.mps.X.exclude_ids=Y
214.Ed
215.Pp
216Y represents the target ID of the device.
217If more than one device is to be excluded, target IDs are separated by commas.
218.Pp
219The adapter can issue the
220.Sy StartStopUnit
221SCSI command to SATA direct-access devices during shutdown.
222This allows the device to quiesce powering down.
223To control this feature for all adapters, set the
224.Bd -literal -offset indent
225hw.mps.enable_ssu
226.Ed
227.Pp
228tunable in
229.Xr loader.conf 5
230to one of these values:
231.Bl -tag -width 6n -offset indent
232.It 0
233Do not send SSU to either HDDs or SSDs.
234.It 1
235Send SSU to SSDs, but not to HDDs.
236This is the default value.
237.It 2
238Send SSU to HDDs, but not to SSDs.
239.It 3
240Send SSU to both HDDs and SSDs.
241.El
242.Pp
243To control this feature for a specific adapter, set this tunable value in
244.Xr loader.conf 5 :
245.Bd -literal -offset indent
246dev.mps.X.enable_ssu
247.Ed
248.Pp
249The same set of values are valid as when setting this tunable for all adapters.
250.Pp
251SATA disks that take several seconds to spin up and fail the SATA Identify
252command might not be discovered by the driver.
253This problem can sometimes be overcome by increasing the value of the spinup
254wait time in
255.Xr loader.conf 5
256with the
257.Bd -literal -offset indent
258hw.mps.spinup_wait_time=NNNN
259.Ed
260.Pp
261tunable.
262NNNN represents the number of seconds to wait for SATA devices to spin up when
263the device fails the initial SATA Identify command.
264.Pp
265Spinup wait times can be set for specific adapters in
266.Xr loader.conf 5 :
267with the
268.Bd -literal -offset indent
269dev.mps.X.spinup_wait_time=NNNN
270.Ed
271.Pp
272tunable.
273NNNN is the number of seconds to wait for SATA devices to spin up when they fail
274the initial SATA Identify command.
275.Pp
276The driver can map devices discovered by the adapter so that target IDs
277corresponding to a specific device persist across resets and reboots.
278In some cases it is possible for devices to lose their mapped IDs due to
279unexpected behavior from certain hardware, such as some types of enclosures.
280To overcome this problem, a tunable is provided that will force the driver to
281map devices using the Phy number associated with the device.
282This feature is not recommended if the topology includes multiple
283enclosures/expanders.
284If multiple enclosures/expanders are present in the topology, Phy numbers are
285repeated, causing all devices at these Phy numbers except the first device to
286fail enumeration.
287To control this feature for all adapters, set the
288.Bd -literal -offset indent
289hw.mps.use_phy_num
290.Ed
291.Pp
292tunable in
293.Xr loader.conf 5
294to one of these values:
295.Bl -tag -width 6n -offset indent
296.It -1
297Only use Phy numbers to map devices and bypass the driver's mapping logic.
298.It 0
299Never use Phy numbers to map devices.
300.It 1
301Use Phy numbers to map devices, but only if the driver's mapping logic fails
302to map the device that is being enumerated.
303This is the default value.
304.El
305.Pp
306To control this feature for a specific adapter, set this tunable value in
307.Xr loader.conf 5 :
308.Bd -literal -offset indent
309dev.mps.X.use_phy_num
310.Ed
311.Pp
312The same set of values are valid as when setting this tunable for all adapters.
313.Sh DEBUGGING
314Driver diagnostic printing is controlled in
315.Xr loader.conf 5
316by using the global
317.Va hw.mps.debug_level
318and per-device
319.Va dev.mps.X.debug_level
320tunables.
321One can alter the debug level for any adapter at run-time using the
322.Xr sysctl 8
323variable
324.Va dev.mps.X.debug_level .
325.Pp
326All
327.Va debug_level
328variables can be named by either an integer value or a text string.
329Multiple values can be specified together by either ORing the
330integer values or by providing a comma-separated list of names.
331A text string prefixed by
332.Qq +
333adds the specified debug levels to the existing set, while the prefix
334.Qq -
335removes them from the existing set.
336The current
337.Va debug_level
338status is reported in both formats for convenience.
339The following levels are available:
340.Bl -column "FlagXX" "NameXXXX" "Description" -offset indent
341.It Em Flag Ta Em Name Ta Em Description
342.It 0x0001 Ta info Ta Basic information (enabled by default)
343.It 0x0002 Ta fault Ta Driver faults (enabled by default)
344.It 0x0004 Ta event Ta Controller events
345.It 0x0008 Ta log Ta Logging data from controller
346.It 0x0010 Ta recovery Ta Tracing of recovery operations
347.It 0x0020 Ta error Ta Parameter errors and programming bugs
348.It 0x0040 Ta init Ta System initialization operations
349.It 0x0080 Ta xinfo Ta More detailed information
350.It 0x0100 Ta user Ta Tracing of user-generated commands (IOCTL)
351.It 0x0200 Ta mapping Ta Tracing of device mapping
352.It 0x0400 Ta trace Ta Tracing through driver functions
353.El
354.Sh SEE ALSO
355.Xr cam 4 ,
356.Xr cd 4 ,
357.Xr ch 4 ,
358.Xr da 4 ,
359.Xr mpr 4 ,
360.Xr mpt 4 ,
361.Xr pci 4 ,
362.Xr sa 4 ,
363.Xr scsi 4 ,
364.Xr targ 4 ,
365.Xr loader.conf 5 ,
366.Xr mpsutil 8 ,
367.Xr sysctl 8
368.Sh HISTORY
369The
370.Nm
371driver first appeared in
372.Fx 9.0 .
373.Sh AUTHORS
374The
375.Nm
376driver was originally written by
377.An -nosplit
378.An Scott Long Aq Mt scottl@FreeBSD.org .
379It has been improved and tested by LSI Corporation,
380Avago Technologies (formerly LSI), and Broadcom Ltd. (formerly Avago).
381.Pp
382This manual page was written by
383.An Ken Merry Aq Mt ken@FreeBSD.org
384with additional input from
385.An Stephen McConnell Aq Mt slm@FreeBSD.org .
386