From nobody@FreeBSD.org  Fri Mar 22 03:40:23 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id 3E0248B4
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 22 Mar 2013 03:40:23 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 16D25D53
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 22 Mar 2013 03:40:23 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r2M3eM3H055524
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 22 Mar 2013 03:40:22 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r2M3eMCB055523;
	Fri, 22 Mar 2013 03:40:22 GMT
	(envelope-from nobody)
Message-Id: <201303220340.r2M3eMCB055523@red.freebsd.org>
Date: Fri, 22 Mar 2013 03:40:22 GMT
From: Eric Millbrandt <emillbrandt@coldhaus.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: mfi driver does not load 8888elp during boot, but will after.
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         177219
>Category:       kern
>Synopsis:       [mfi] mfi driver does not load 8888elp during boot, but will after.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 22 03:50:01 UTC 2013
>Closed-Date:    
>Last-Modified:  Wed Mar 27 01:49:42 UTC 2013
>Originator:     Eric Millbrandt
>Release:        9.1-RELEASE
>Organization:
>Environment:
FreeBSD norco.coldhaus.com 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Thu Mar 21 13:32:53 EDT 2013     root@norco.coldhaus.com:/usr/obj/usr/src/sys/GENERIC.mfi  amd64
>Description:
I recently installed a LSI 8888ELP SAS raid card and had trouble getting it working.  After much frustration I discovered that if I load the driver as a module, after the kernel has booted, it works.  Below are the kernel messages of the driver failing to load and it loading.  Both the stock FreeBSD mfi driver and the mfi driver from LSI show the same behavior.


Mar 21 12:24:01 norco kernel: mfi0: <LSI MegaSAS 1078> port 0x2000-0x20ff irq 16 at device 0.0 on pci5
Mar 21 12:24:01 norco kernel: mfi0: Using MSI
Mar 21 12:24:01 norco kernel: mfi0: Megaraid SAS driver Ver 4.23 
Mar 21 12:24:01 norco kernel: mfi0: Cannot allocate frame DMA tag
Mar 21 12:24:01 norco kernel: device_attach: mfi0 attach returned 12

This snippet is LSI's mfi driver also failing to load on boot:
mfi0: <LSI MegaSAS 1078> port 0x2000-0x20ff irq 16 at device 0.0 on pci5
mfi0: Megaraid SAS driver Ver 4.410.01.00 
mfi0: Firmware fault
mfi0: Firmware not in READY state, error 6
mfi0: mfi_free starts
mfi0: mfi_free release DMA tag
device_attach: mfi0 attach returned 6


Log after recompiling the kernel with mfi compiled as a module and loaded after the kernel has finished loading:

mfi0: <LSI MegaSAS 1078> port 0x2000-0x20ff mem 0xd0200000-0xd023ffff irq 16 at device 0.0 on pci5
mfi0: Using MSI
mfi0: Megaraid SAS driver Ver 4.23 
mfi0: 934979 (417236768s/0x0020/info) - Shutdown command received from host
mfid0 on mfi0
mfid0: 207168MB (424280064 sectors) RAID volume 'MAV2036-R5' is optimal
mfid1 on mfi0
mfid1: 139488MB (285671424 sectors) RAID volume 'Seagate' is optimal

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:
