Bug 198463 - [mfi] COMMAND 0x... TIMEOUT AFTER ## SECONDS (LSI MegaRAID 9361-8i)
Summary: [mfi] COMMAND 0x... TIMEOUT AFTER ## SECONDS (LSI MegaRAID 9361-8i)
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 9.3-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-09 18:18 UTC by Remko Catersels
Modified: 2015-10-28 15:14 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Remko Catersels 2015-03-09 18:18:39 UTC
I am unable to install FreeBSD 9.3-RELEASE on a SuperMicro X10DRi-LN4 with an LSI MegaRAID 9361-8i. During installation the card produces "COMMAND 0x..... TIMEOUT AFTER ## SECONDS" errors and stalls. Sometimes the errors do not occur during installation but then the system produces the same error messages when booting, trying to mount the root filesystem. 

Both X10DRi-LN4 and the LSI card have been updated to the latest firmwares.

I also tried FreeBSD 10.1-RELEASE, 9-STABLE (7 Feb) and 10-STABLE (23 Feb). All with the same "TIMEOUT" errors.
Comment 1 Mark Johnston freebsd_committer freebsd_triage 2015-03-09 18:26:29 UTC
You might try using the mrsas(4) driver for this controller instead of mfi(4). Both drivers can attach to this card; mrsas(4) can be selected by setting hw.mfi.mrsas_enable=1 at the loader prompt, and has better support for newer LSI controllers.
Comment 2 Remko Catersels 2015-03-16 09:32:27 UTC
Ah. That's definitely worth a try. In case it doesn't work or is still unstable, how do I turn off FreeBSD's mfi/mrsas driver so I can use the driver from LSI?
Comment 3 Remko Catersels 2015-03-16 09:50:21 UTC
I still seem to get timeouts on FreeBSD 9.3-RELEASE with hw.mfi.mrsas_enable=1. How can I tell if the mrsas(4) driver is being loaded instead of the 'old' mfi(4) one?

I understand how to build a custom kernel but I would prefer to use the stock GENERIC kernel so I can use freebsd-update(8) more easily.
Comment 4 Remko Catersels 2015-03-16 12:24:51 UTC
I had a conversation with Sibananda Sahu, I'm not sure if it made it to here. 

Quick recap:

hw.mfi.mrsas_enable=1 only works on 10.1-RELEASE, it does nothing on 9.3-RELEASE. 

With hw.mfi.mrsas_enable=1 I was able to install 10.1-RELEASE without any timeouts or other errors. I'm currently running a bonnie++ test to see how stable things are but it's looking very good so far. 

The difference is easy to tell, with the mfi(4) driver a virtual disk shows up as mfid0, with the mrsas(4) driver it's detected as da0. 

If time permits today I'll see if I can create a custom 9.3-RELEASE install with the mfi(4)/mrsas(4) driver removed, to test the driver from LSI (an mrsas driver can be downloaded for 7.4, 8.2, 8.3, 8.4, 9.0, 9.1, 9.2, 9.3 and 10.0). The driver from LSI should be newer than the one that came with FreeBSD.
Comment 5 Sibananda Sahu 2015-03-17 10:03:31 UTC
Quick recap:

>>>hw.mfi.mrsas_enable=1 only works on 10.1-RELEASE, it does nothing on 9.3-RELEASE. 

Siba: Yes true. To use mrsas(4) on FreeBSD-9.3 one must have to remove the mfi(4) completely from kernel and install the mrsas(4) separately as a module.

>>>With hw.mfi.mrsas_enable=1 I was able to install 10.1-RELEASE without any timeouts or other errors. I'm currently running a bonnie++ test to see how stable things are but it's looking very good so far.

Siba: NA

>>>The difference is easy to tell, with the mfi(4) driver a virtual disk shows up as mfid0, with the mrsas(4) driver it's detected as da0. 

Siba: Yes that is also true because mrsas(4) uses CAM layer and mfi(4) uses the block layer for the drive exposure.

>>>If time permits today I'll see if I can create a custom 9.3-RELEASE install with the mfi(4)/mrsas(4) driver removed, to test the driver from LSI (an mrsas driver can be downloaded for 7.4, 8.2, 8.3, 8.4, 9.0, 9.1, 9.2, 9.3 and 10.0).
>>>The driver from LSI should be newer than the one that came with FreeBSD.

Siba: The driver available in the LSI website will have the most recent code changes than the FreeBSD-xx.x inbox code (May not true always but most of the times).
As the downloaded package does not contain the binaries for 10.1, you can download the source code, compile and install yourself on your 10.1 machine to witness the truth.

Thanks,
Siba
Comment 6 Sibananda Sahu 2015-03-17 10:18:41 UTC
(In reply to sirdice from comment #3)

As Mark J said both mfi(4) and mrsas(4) can be used for this controller.
By default in FreeBSD 9.3 or 10.1, the mfi(4) driver will be coupled to this controller(LSI MegaRAID 9361-8i).

If you want to override this default behavior then you have to provide hw.mfi.mrsas_enable=1 at the loader prompt.

This setting will not work on FreeBSD-9.3 as this setting is controlled by mfi(4) driver and mfi(4) driver just lacks checking of this setting in FreeBSD-9.3.
But this setting will work just fine in the case of FreeBSD-10.1.

If you want mrsas(4) on FreeBSD-9.3 then you have to re-compile the kernel with mfi(4) unloaded and then you can use the mrsas(4) as a module.
You can download the mrsas(4) driver module from the www.lsi.com website itself.

Find the FreeBSD driver from the below link:
http://goo.gl/otslzH

- Sibananda Sahu
AVAGO Technologies Pvt. Ltd.
Comment 7 Remko Catersels 2015-04-20 13:04:15 UTC
The system has been running fine using the mrsas(4) driver from FreeBSD (10.1). One thing I have noticed is that mfiutil(8) doesn't work any more. Is there an alternative to use?
Comment 8 Sibananda Sahu 2015-04-21 06:32:35 UTC
(In reply to sirdice from comment #7)

mrsas(4) is not supporting the mfiutil(8) yet.
You can use the LSI application for the same purpose i.e StorCli, which is available on www.lsi.com

Below is the download location:
http://www.lsi.com/downloads/Public/RAID%20Controllers/RAID%20Controllers%20Common%20Files/1.15.05_StorCLI.zip

Hope this helps.


- Sibananda Sahu
Comment 9 Remko Catersels 2015-10-28 15:14:18 UTC
Both systems with 10.1 are running fine with the mrsas(4) driver. As far as I'm concerned this ticket can be closed.