xref: /freebsd/share/man/man4/mpr.4 (revision 64a0982bee3db2236df43357e70ce8dddbc21d48)
1.\"
2.\" Copyright (c) 2010 Spectra Logic Corporation
3.\" Copyright (c) 2014 LSI Corp
4.\" Copyright (c) 2016 Avago Technologies
5.\" Copyright (c) 2016 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.\" $FreeBSD$
40.\"
41.Dd July 6, 2016
42.Dt MPR 4
43.Os
44.Sh NAME
45.Nm mpr
46.Nd "LSI Fusion-MPT 3 IT/IR 12Gb/s Serial Attached SCSI/SATA driver"
47.Sh SYNOPSIS
48To compile this driver into the kernel, place these lines in the kernel
49configuration file:
50.Bd -ragged -offset indent
51.Cd "device pci"
52.Cd "device scbus"
53.Cd "device mpr"
54.Ed
55.Pp
56The driver can be loaded as a module at boot time by placing this line in
57.Xr loader.conf 5 :
58.Bd -literal -offset indent
59mpr_load="YES"
60.Ed
61.Sh DESCRIPTION
62The
63.Nm
64driver provides support for Broadcom Ltd./Avago Tech (LSI)
65Fusion-MPT 3 IT/IR
66.Tn SAS
67controllers.
68.Sh HARDWARE
69These controllers are supported by the
70.Nm
71driver:
72.Pp
73.Bl -bullet -compact
74.It
75Broadcom Ltd./Avago Tech (LSI) SAS 3004 (4 Port SAS)
76.It
77Broadcom Ltd./Avago Tech (LSI) SAS 3008 (8 Port SAS)
78.It
79Broadcom Ltd./Avago Tech (LSI) SAS 3108 (8 Port SAS)
80.It
81Broadcom Ltd./Avago Tech (LSI) SAS 3216 (16 Port SAS)
82.It
83Broadcom Ltd./Avago Tech (LSI) SAS 3224 (24 Port SAS)
84.El
85.Sh CONFIGURATION
86In all tunable descriptions below, X represents the adapter number.
87.Pp
88To disable MSI interrupts for all
89.Nm
90driver instances, set this tunable value in
91.Xr loader.conf 5 :
92.Bd -literal -offset indent
93hw.mpr.disable_msi=1
94.Ed
95.Pp
96To disable MSI interrupts for a specific
97.Nm
98driver instance, set this tunable value in
99.Xr loader.conf 5 :
100.Bd -literal -offset indent
101dev.mpr.X.disable_msi=1
102.Ed
103.Pp
104To disable MSI-X interrupts for all
105.Nm
106driver instances, set this tunable value in
107.Xr loader.conf 5 :
108.Bd -literal -offset indent
109hw.mpr.disable_msix=1
110.Ed
111.Pp
112To disable MSI-X interrupts for a specific
113.Nm
114driver instance, set this tunable value in
115.Xr loader.conf 5 :
116.Bd -literal -offset indent
117dev.mpr.X.disable_msix=1
118.Ed
119.Pp
120To set the maximum number of DMA chains allocated for all adapters, set
121this tunable in
122.Xr loader.conf 5 :
123.Bd -literal -offset indent
124hw.mpr.max_chains=NNNN
125.Ed
126.Pp
127To set the maximum number of DMA chains allocated for a specific adapter,
128set this tunable in
129.Xr loader.conf 5 :
130.Bd -literal -offset indent
131dev.mpr.X.max_chains=NNNN
132.Ed
133.Pp
134The default max_chains value is 2048.
135.Pp
136The current number of free chain frames is stored in the
137dev.mpr.X.chain_free
138.Xr sysctl 8
139variable.
140.Pp
141The lowest number of free chain frames seen since boot is stored in the
142dev.mpr.X.chain_free_lowwater
143.Xr sysctl 8
144variable.
145.Pp
146The number of times that chain frame allocations have failed since boot is
147stored in the
148dev.mpr.X.chain_alloc_fail
149.Xr sysctl 8
150variable.
151This can be used to determine whether the max_chains tunable should be
152increased to help performance.
153.Pp
154The current number of active I/O commands is shown in the
155dev.mpr.X.io_cmds_active
156.Xr sysctl 8
157variable.
158.Pp
159To set the maximum number of pages that will be used per I/O for all adapters,
160set this tunable in
161.Xr loader.conf 5 :
162.Bd -literal -offset indent
163hw.mpr.max_io_pages=NNNN
164.Ed
165.Pp
166To set the maximum number of pages that will be used per I/O for a specific
167adapter, set this tunable in
168.Xr loader.conf 5 :
169.Bd -literal -offset indent
170dev.mpr.X.max_io_pages=NNNN
171.Ed
172.Pp
173The default max_io_pages value is -1, meaning that the maximum I/O size that
174will be used per I/O will be calculated using the IOCFacts values stored in
175the controller.
176The lowest value that the driver will use for max_io_pages is 1, otherwise
177IOCFacts will be used to calculate the maximum I/O size.
178The smaller I/O size calculated from either max_io_pages or IOCFacts will be the
179maximum I/O size used by the driver.
180.Pp
181The highest number of active I/O commands seen since boot is stored in the
182dev.mpr.X.io_cmds_highwater
183.Xr sysctl 8
184variable.
185.Pp
186Devices can be excluded from
187.Nm
188control for all adapters by setting this tunable in
189.Xr loader.conf 5 :
190.Bd -literal -offset indent
191hw.mpr.exclude_ids=Y
192.Ed
193.Pp
194Y represents the target ID of the device.
195If more than one device is to be excluded, target IDs are separated by commas.
196.Pp
197Devices can be excluded from
198.Nm
199control for a specific adapter by setting this tunable in
200.Xr loader.conf 5 :
201.Bd -literal -offset indent
202dev.mpr.X.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
208The adapter can issue the
209.Sy StartStopUnit
210SCSI command to SATA direct-access devices during shutdown.
211This allows the device to quiesce powering down.
212To control this feature for all adapters, set the
213.Bd -literal -offset indent
214hw.mpr.enable_ssu
215.Ed
216.Pp
217tunable in
218.Xr loader.conf 5
219to one of these values:
220.Bl -tag -width 6n -offset indent
221.It 0
222Do not send SSU to either HDDs or SSDs.
223.It 1
224Send SSU to SSDs, but not to HDDs.
225This is the default value.
226.It 2
227Send SSU to HDDs, but not to SSDs.
228.It 3
229Send SSU to both HDDs and SSDs.
230.El
231.Pp
232To control the feature for a specific adapter, set this tunable value in
233.Xr loader.conf 5 :
234.Bd -literal -offset indent
235dev.mpr.X.enable_ssu
236.Ed
237.Pp
238The same set of values are valid when setting this tunable for all adapters.
239.Pp
240SATA disks that take several seconds to spin up and fail the SATA Identify
241command might not be discovered by the driver.
242This problem can sometimes be overcome by increasing the value of the spinup
243wait time in
244.Xr loader.conf 5
245with the
246.Bd -literal -offset indent
247hw.mpr.spinup_wait_time=NNNN
248.Ed
249.Pp
250tunable.
251NNNN represents the number of seconds to wait for SATA devices to spin up when
252the device fails the initial SATA Identify command.
253.Pp
254Spinup wait times can be set for specific adapters in
255.Xr loader.conf 5 :
256with the
257.Bd -literal -offset indent
258dev.mpr.X.spinup_wait_time=NNNN
259.Ed
260.Pp
261tunable.
262NNNN is the number of seconds to wait for SATA devices to spin up when they fail
263the initial SATA Identify command.
264.Sh DEBUGGING
265To enable debugging prints from the
266.Nm
267driver, set the
268.Bd -literal -offset indent
269hw.mpr.X.debug_level
270.Ed
271.Pp
272tunable, either in
273.Xr loader.conf 5
274or by using
275.Xr sysctl 8 .
276These bits have the described effects:
277.Bd -literal -offset indent
2780x0001 Enable informational prints (set by default).
2790x0002 Enable prints for driver faults (set by default).
2800x0004 Enable prints for controller events.
2810x0008 Enable prints for controller logging.
2820x0010 Enable prints for tracing recovery operations.
2830x0020 Enable prints for parameter errors and programming bugs.
2840x0040 Enable prints for system initialization operations.
2850x0080 Enable prints for more detailed information.
2860x0100 Enable prints for user-generated commands (IOCTL).
2870x0200 Enable prints for device mapping.
2880x0400 Enable prints for tracing through driver functions.
289.Ed
290.Sh SEE ALSO
291.Xr cam 4 ,
292.Xr cd 4 ,
293.Xr ch 4 ,
294.Xr da 4 ,
295.Xr mps 4 ,
296.Xr mpt 4 ,
297.Xr pci 4 ,
298.Xr sa 4 ,
299.Xr scsi 4 ,
300.Xr targ 4 ,
301.Xr loader.conf 5 ,
302.Xr sysctl 8
303.Sh HISTORY
304The
305.Nm
306driver first appeared in FreeBSD 9.3.
307.Sh AUTHORS
308The
309.Nm
310driver was originally written by
311.An -nosplit
312.An Scott Long Aq Mt scottl@FreeBSD.org .
313It has been improved and tested by LSI Corporation,
314Avago Technologies (formally LSI), and Broadcom Ltd. (formally Avago).
315.Pp
316This man page was written by
317.An Ken Merry Aq Mt ken@FreeBSD.org
318with additional input from
319.An Stephen McConnell Aq Mt slm@FreeBSD.org .
320