From owner-freebsd-hardware@FreeBSD.ORG Thu Mar 22 15:29:33 2012 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC0A1106567A; Thu, 22 Mar 2012 15:29:33 +0000 (UTC) (envelope-from jake@xz.cx) Received: from floor13.viper.enta.net (floor13.viper.enta.net [78.33.24.2]) by mx1.freebsd.org (Postfix) with ESMTP id 941EC8FC24; Thu, 22 Mar 2012 15:29:33 +0000 (UTC) Received: from xz.cx (floor13.viper.enta.net [78.33.24.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jake) by floor13.viper.enta.net (Postfix) with ESMTPSA id 77E18BDCB7; Thu, 22 Mar 2012 15:24:17 +0000 (GMT) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 22 Mar 2012 16:24:16 +0100 From: Jake Smith To: , , , Message-ID: X-Sender: jake@xz.cx User-Agent: Roundcube Webmail/0.6 Cc: Subject: LSI mps(4) driver issues with PIKE 2008/IMR (LSI SAS2008) X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2012 15:29:34 -0000 Hello, I am trying to get the latest mps(4) driver in FreeBSD 9-STABLE working with am LSI SAS2008 variant from ASUS, they call it PIKE 2008/IMR. Link http://www.asus.com/Server_Workstation/Accessories/PIKE_2008IMR/ From what I can see this card should be compatible with the mps(4) driver MFC'd to 9-STABLE about 6 weeks ago. # uname -a FreeBSD xxx 9.0-STABLE FreeBSD 9.0-STABLE #3 r233304M: Thu Mar 22 12:53:17 GMT 2012 root@xxx:/usr/obj/usr/src/sys/GENERIC amd64 Revision: 233304 Initially the card is not seen at all by the driver, however pciconf shows us why that is. mps0@pci0:2:0:0: class=0x010700 card=0x843b1043 chip=0x00731000 rev=0x03 hdr=0x00 vendor = 'LSI Logic / Symbios Logic' device = 'MegaRAID SAS 9240' class = mass storage subclass = SAS It seems on other models of LSI SAS2008 the chip device ID is 0x0072, however for some reason this card has 0x0073. So I patched the mps(4) driver and recompiled. diff -ruN mps.orig/mpi/mpi2_cnfg.h mps/mpi/mpi2_cnfg.h --- mps.orig/mpi/mpi2_cnfg.h 2012-03-22 14:50:53.000000000 +0000 +++ mps/mpi/mpi2_cnfg.h 2012-03-22 14:52:23.000000000 +0000 @@ -416,7 +416,8 @@ /* SAS */ #define MPI2_MFGPAGE_DEVID_SAS2004 (0x0070) -#define MPI2_MFGPAGE_DEVID_SAS2008 (0x0072) +#define MPI2_MFGPAGE_DEVID_SAS2008_1 (0x0072) +#define MPI2_MFGPAGE_DEVID_SAS2008_2 (0x0073) #define MPI2_MFGPAGE_DEVID_SAS2108_1 (0x0074) #define MPI2_MFGPAGE_DEVID_SAS2108_2 (0x0076) #define MPI2_MFGPAGE_DEVID_SAS2108_3 (0x0077) diff -ruN mps.orig/mps_pci.c mps/mps_pci.c --- mps.orig/mps_pci.c 2012-03-22 14:48:41.000000000 +0000 +++ mps/mps_pci.c 2012-03-22 14:51:59.000000000 +0000 @@ -99,7 +99,9 @@ } mps_identifiers[] = { { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2004, 0xffff, 0xffff, 0, "LSI SAS2004" }, - { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2008, + { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2008_1, + 0xffff, 0xffff, 0, "LSI SAS2008" }, + { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2008_2, 0xffff, 0xffff, 0, "LSI SAS2008" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2108_1, 0xffff, 0xffff, 0, "LSI SAS2108" }, After reboot it now loads the mps(4) module and attempts to init the card but fails. # dmesg | grep mps mps0: port 0xd800-0xd8ff mem 0xfbd7c000-0xfbd7ffff,0xfbdc0000-0xfbdfffff irq 16 at device 0.0 on pci2 mps0: Doorbell failed to activate device_attach: mps0 attach returned 6 From this point I'm stuck on what to try next, google does not provide any answers for this situation. Does any one have any advice or ideas as to why this is not working? I am able to provide ssh access to the server if any one wants to log on and have a look at it. Really appreciate any help you can give. Kind Regards Jake