1.\" 2.\" SPDX-License-Identifier: BSD-3-Clause 3.\" 4.\" Copyright (c) 2014 LSI Corp 5.\" All rights reserved. 6.\" Author: Kashyap Desai 7.\" Support: freebsdraid@lsi.com 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 3. Neither the name of the <ORGANIZATION> nor the names of its 18.\" contributors may be used to endorse or promote products derived 19.\" from this software without specific prior written permission. 20.\" 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 MERCHANTABILITY AND FITNESS 24.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25.\" COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32.\" POSSIBILITY OF SUCH DAMAGE. 33.\" 34.\" The views and conclusions contained in the software and documentation 35.\" are those of the authors and should not be interpreted as representing 36.\" official policies, either expressed or implied, of the FreeBSD Project. 37.\" 38.Dd August 22, 2025 39.Dt MRSAS 4 40.Os 41.Sh NAME 42.Nm mrsas 43.Nd Broadcom/LSI MegaRAID 6/12Gb/s SAS+SATA RAID controller driver 44.Sh SYNOPSIS 45.Cd "device pci" 46.Cd "device mrsas" 47.Pp 48In 49.Xr loader.conf 5 : 50.Cd mrsas_load="YES" 51.Pp 52In 53.Xr sysctl.conf 5 : 54.Cd dev.mrsas.X.disable_ocr 55.Cd dev.mrsas.X.fw_outstanding 56.Cd dev.mrsas.X.mrsas_fw_fault_check_delay 57.Cd dev.mrsas.X.mrsas_io_timeout 58.Cd hw.mrsas.X.debug_level 59.Sh DESCRIPTION 60The 61.Nm 62driver will detect Broadcom/LSI's 6Gb/s and 12Gb/s 63PCI Express SAS/SATA/NVMe RAID controllers. 64A disk 65.Pq virtual disk/physical disk 66attached to the 67.Nm 68driver will be visible to the user through 69.Xr camcontrol 8 70as 71.Pa /dev/da? 72device nodes. 73A simple management interface is also provided per-controller via the 74.Pa /dev/mrsas? 75device node. 76.Pp 77The 78.Nm 79name is derived from the phrase "MegaRAID SAS HBA", which is 80substantially different than the old "MegaRAID" Driver 81.Xr mfi 4 82which does not connect targets to the 83.Xr cam 4 84layer and thus requires a new driver which attaches targets to the 85.Xr cam 4 86layer. 87Older MegaRAID controllers are supported by 88.Xr mfi 4 89and will not work with 90.Nm , 91but both the 92.Xr mfi 4 93and 94.Nm 95drivers can detect and manage the 96Broadcom/LSI MegaRAID SAS 2208/2308/3008/3108 series of controllers. 97.Pp 98The 99.Xr device.hints 5 100option is provided to tune the 101.Nm 102driver's behavior for LSI MegaRAID SAS 2208/2308/3008/3108 controllers. 103By default, the 104.Xr mfi 4 105driver will detect these controllers. 106See the 107.Sx PRIORITY 108section to know more about driver priority for MR-Fusion devices. 109.Pp 110.Nm 111will provide a priority of (-30) (between 112.Dv BUS_PROBE_DEFAULT 113and 114.Dv BUS_PROBE_LOW_PRIORITY ) 115at probe call for device id's 0x005B, 0x005D, and 1160x005F so that 117.Nm 118does not take control of these devices without user intervention. 119.Pp 120Solid-state drives (SSD) get ATA TRIM support with 121.Nm 122if underlying adapter allows it. 123This may require configuring SSD as Non-RAID drive 124rather then JBOD virtual mode. 125.Sh HARDWARE 126The 127.Nm 128driver supports the following LSI/Broadcom SATA/SAS RAID controllers: 129.Pp 130.Bl -column -compact "LSI MegaRAID SAS 9380" "Invader/Fury" "12Gb/s" 131.It Controller Ta Chip Ta Speed 132.It Broadcom SAS3916 Ta Aero Ta 12Gb/s 133.It Broadcom SAS3908 Ta Aero Ta 12Gb/s 134.It LSI MegaRAID SAS 9380 Ta Invader/Fury Ta 12Gb/s 135.It LSI MegaRAID SAS 9361 Ta Invader/Fury Ta 12Gb/s 136.It LSI MegaRAID SAS 9341 Ta Invader/Fury Ta 12Gb/s 137.It LSI MegaRAID SAS 9286 Ta Thunderbolt Ta 6Gb/s 138.It LSI MegaRAID SAS 9285 Ta Thunderbolt Ta 6Gb/s 139.It LSI MegaRAID SAS 9272 Ta Thunderbolt Ta 6Gb/s 140.It LSI MegaRAID SAS 9271 Ta Thunderbolt Ta 6Gb/s 141.It LSI MegaRAID SAS 9270 Ta Thunderbolt Ta 6Gb/s 142.It LSI MegaRAID SAS 9267 Ta Thunderbolt Ta 6Gb/s 143.It LSI MegaRAID SAS 9266 Ta Thunderbolt Ta 6Gb/s 144.It LSI MegaRAID SAS 9265 Ta Thunderbolt Ta 6Gb/s 145.It LSI SAS 3108 Ta Ta 12Gb/s 146.It LSI SAS 3008 Ta Ta 12Gb/s 147.It LSI SAS 2308 Ta Ta 6Gb/s 148.It LSI SAS 2208 Ta Ta 6Gb/s 149.It DELL PERC H830 Ta Invader/Fury Ta 12Gb/s 150.It DELL PERC H810 Ta Thunderbolt Ta 6Gb/s 151.It DELL PERC H730/P Ta Invader/Fury Ta 12Gb/s 152.It DELL PERC H710/P Ta Thunderbolt Ta 6Gb/s 153.It DELL PERC H330 Ta Invader/Fury Ta 12Gb/s 154.El 155.Sh CONFIGURATION 156To disable Online Controller Reset(OCR) for a specific 157.Nm 158driver instance, set the 159following tunable value in 160.Xr loader.conf 5 : 161.Pp 162.Dl Va dev.mrsas.X.disable_ocr=1 163.Pp 164where X is the adapter number. 165.Pp 166To change the I/O timeout value for a specific 167.Nm 168driver instance, set the following tunable value in 169.Xr loader.conf 5 : 170.Pp 171.Dl Va dev.mrsas.X.mrsas_io_timeout=NNNNNN 172.Pp 173where NNNNNN is the timeout value in milli-seconds. 174.Pp 175To change the firmware fault check timer value for a specific 176.Nm 177driver instance, set the following tunable value in 178.Xr loader.conf 5 : 179.Pp 180.Dl Va dev.mrsas.X.mrsas_fw_fault_check_delay=NN 181.Pp 182where NN is the fault check delay value in seconds. 183.Pp 184The current number of active I/O commands is shown in the 185.Va dev.mrsas.X.fw_outstanding 186.Xr sysctl 8 187variable. 188.Sh DEBUGGING 189To enable debugging prints from the 190.Nm 191driver, set the 192.Va hw.mrsas.X.debug_level 193variable, where X is the adapter number, either in 194.Xr loader.conf 5 195or via 196.Xr sysctl 8 . 197The following bits have the described effects: 198.Bl -tag -width indent -offset indent 199.It 0x01 200Enable informational prints. 201.It 0x02 202Enable tracing prints. 203.It 0x04 204Enable prints for driver faults. 205.It 0x08 206Enable prints for OCR and I/O timeout. 207.It 0x10 208Enable prints for AEN events. 209.El 210.Sh PRIORITY 211The 212.Nm 213driver will always set a default (-30) priority in the PCI subsystem for 214selection of MR-Fusion cards. 215(It is between 216.Dv BUS_PROBE_DEFAULT 217and 218.Dv BUS_PROBE_LOW_PRIORITY ) . 219MR-Fusion Controllers include all cards with the 220Device IDs - 2210x005B, 2220x005D, 2230x005F. 224.Pp 225The 226.Xr mfi 4 227driver will set a priority of either 228.Dv BUS_PROBE_DEFAULT 229or 230.Dv BUS_PROBE_LOW_PRIORITY 231(depending on the device.hints setting) in the PCI 232subsystem for selection of MR-Fusion cards. 233With the above design in place, the 234.Xr mfi 4 235driver will attach to a MR-Fusion card 236given that it has a higher priority than 237.Nm . 238.Pp 239Using 240.Pa /boot/device.hints 241(as mentioned below), the user can provide a preference 242for the 243.Nm 244driver to detect a MR-Fusion card instead of the 245.Xr mfi 4 246driver. 247.Bd -ragged -offset indent 248.Cd hw.mfi.mrsas_enable="1" 249.Ed 250.Pp 251At boot time, the 252.Xr mfi 4 253driver will get priority to detect MR-Fusion controllers by default. 254Before 255changing this default driver selection policy, 256LSI advises users to understand how the driver selection policy works. 257LSI's policy is to provide priority to 258the 259.Xr mfi 4 260driver to detect MR-Fusion cards, 261but allow for the ability to choose the 262.Nm 263driver to detect MR-Fusion cards. 264.Pp 265LSI recommends setting 266.Va hw.mfi.mrsas_enable="0" 267for customers who are using the older 268.Xr mfi 4 269driver and do not want to switch to 270.Nm . 271For those using a MR-Fusion controller for the first time, 272LSI recommends using the 273.Nm 274driver and setting 275.Va hw.mfi.mrsas_enable="1". 276.Pp 277Changing the default behavior is well tested under most conditions, 278but unexpected behavior may pop up 279if more complex and unrealistic operations are executed 280by switching between the 281.Xr mfi 4 282and 283.Nm 284drivers for MR-Fusion. 285Switching drivers is designed to happen only one time. 286Although multiple switching is possible, it is not recommended. 287The user should decide from 288.Sy boot 289which driver they want to use for the MR-Fusion card. 290.Pp 291The user may see different device names when switching from 292.Xr mfi 4 293to 294.Nm . 295This behavior 296.Sy works as intended 297and the user needs to change the 298.Xr fstab 5 299entry manually if they are doing any experiments with 300.Xr mfi 4 301and 302.Nm 303interoperability. 304.Sh FILES 305.Bl -tag -width "/dev/mrsas?" -compact 306.It Pa /dev/da? 307array/logical disk interface 308.It Pa /dev/mrsas? 309management interface 310.El 311.Sh SEE ALSO 312.Xr cam 4 , 313.Xr mfi 4 , 314.Xr pci 4 , 315.Xr device.hints 5 , 316.Xr camcontrol 8 317.Sh HISTORY 318The 319.Nm 320driver first appeared in 321.Fx 10.1 . 322.Bd -ragged 323.Cd "mfi Driver:" 324.Xr mfi 4 325is the old 326.Fx 327driver which started with support for Gen-1 Controllers and 328was extended to support up to MR-Fusion 329.Pq Device ID = 0x005B, 0x005D, 0x005F . 330.Ed 331.Bd -ragged 332.Cd "mrsas Driver:" 333.Nm 334is the new driver reworked by LSI which supports Thunderbolt and onward 335products. 336The SAS+SATA RAID controller with device id 0x005b is referred to as 337the Thunderbolt controller throughout this man page. 338.Ed 339.Bd -ragged 340.Sy cam aware HBA drivers: 341.Fx 342has a 343.Xr cam 4 344layer which attaches storage devices and provides a 345common access mechanism to storage controllers and attached devices. 346The 347.Nm 348driver is 349.Xr cam 4 350aware and devices associated with 351.Nm 352can be seen using 353.Xr camcontrol 8 . 354The 355.Xr mfi 4 356driver does not understand the 357.Xr cam 4 358layer and it directly associates storage disks to the block layer. 359.Pp 360.Sy Thunderbolt Controller: 361This is the 6Gb/s MegaRAID HBA card which has device id 0x005B. 362.Pp 363.Sy Invader Controller: 364This is 12Gb/s MegaRAID HBA card which has device id 0x005D. 365.Pp 366.Sy Fury Controller: 367This is the 12Gb/s MegaRAID HBA card which has device id 0x005F. 368.Ed 369.Sh AUTHORS 370The 371.Nm 372driver and this manual page were written by 373.An Kashyap Desai Aq Mt Kashyap.Desai@lsi.com . 374.Sh CAVEATS 375The 376.Nm 377driver exposes devices as 378.Pa /dev/da? , 379whereas 380.Xr mfi 4 381exposes devices as 382.Pa /dev/mfid? . 383.Pp 384.Nm 385does not support the Linux Emulator Interface, 386.Xr mfiutil 8 , 387or device name aliases for switching drivers without editing 388.Xr fstab 5 . 389