From owner-freebsd-scsi@FreeBSD.ORG Tue Mar 18 14:39:42 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C51325C2; Tue, 18 Mar 2014 14:39:42 +0000 (UTC) Received: from mtv-iport-1.cisco.com (mtv-iport-1.cisco.com [173.36.130.12]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 90BFDA26; Tue, 18 Mar 2014 14:39:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=6989; q=dns/txt; s=iport; t=1395153582; x=1396363182; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=iVxsnu9FXDILRykMhIyELIMizbVTOWMVZbxWYrciXDw=; b=EWwGz1n9ml4KRVaj407jM5ZsRXWP+2cX4jloo7emugdnOFZz7dtacr27 Rlmidts+V3R0Dls1kBZywnFvaEqexNf7AcE28HxbLTlieHV6xh7wHBO8z v53jiEE82XJ7IRsVgFz7uHJ4wyZvgHJ2layBaSovA106h0F6Fra+Av2Mt s=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkUFAAhaKFOrRDoI/2dsb2JhbABagwasSpZqgSQWdIIlAQEBBCcTPwwECxEEAQEKHgcPBTEBCQ4Th2UDENFkF4xKghgHBoMegRQBA4lSjQ2BZgGMaIVIg00 X-IronPort-AV: E=Sophos;i="4.97,678,1389744000"; d="scan'208";a="105109494" Received: from mtv-core-3.cisco.com ([171.68.58.8]) by mtv-iport-1.cisco.com with ESMTP; 18 Mar 2014 14:38:35 +0000 Received: from dambriskodt.cisco.com (dambriskodt.cisco.com [171.71.230.115]) by mtv-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id s2IEcYPj017470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 18 Mar 2014 14:38:35 GMT Received: from dambriskodt.cisco.com (localhost [127.0.0.1]) by dambriskodt.cisco.com (8.14.7/8.14.3) with ESMTP id s2IEbdEp066016; Tue, 18 Mar 2014 07:37:39 -0700 (PDT) (envelope-from ambrisko@dambriskodt.cisco.com) Received: (from ambrisko@localhost) by dambriskodt.cisco.com (8.14.7/8.14.3/Submit) id s2IEbc0I066015; Tue, 18 Mar 2014 07:37:38 -0700 (PDT) (envelope-from ambrisko) Date: Tue, 18 Mar 2014 07:37:38 -0700 From: Doug Ambrisko To: "Desai, Kashyap" Subject: Re: LSI - MR-Fusion controller driver patch and man page Message-ID: <20140318143738.GA65955@cisco.com> References: <08ba2a262fba45f687cdd3225f325110@BN1PR07MB247.namprd07.prod.outlook.com> <20140103211449.GA69721@cisco.com> <8c423414ecc2421fbace3eb9f386be91@BN1PR07MB247.namprd07.prod.outlook.com> <20140106182935.GC93278@cisco.com> <20140107181139.GC2080@cisco.com> <20140124185356.GA28724@ambrisko.com> <20140124190047.GA34975@ambrisko.com> <9c3fd2b15e9b4c2cb967519a3b7f98ad@BN1PR07MB247.namprd07.prod.outlook.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9c3fd2b15e9b4c2cb967519a3b7f98ad@BN1PR07MB247.namprd07.prod.outlook.com> User-Agent: Mutt/1.4.2.3i X-Mailman-Approved-At: Tue, 18 Mar 2014 15:24:18 +0000 Cc: "scottl@netflix.com" , "Radford, Adam" , "Kenneth D. Merry" , "sean_bruno@yahoo.com" , "Mankani, Krishnaraddi" , "dwhite@ixsystems.com" , "Maloy, Joe" , "jpaetzel@freebsd.org" , "freebsd-scsi@freebsd.org" , "McConnell, Stephen" X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Mar 2014 14:39:42 -0000 Sounds good. I'll try it out and see how it works. I won't be able to make today's meeting. Thanks, Doug A. On Tue, Mar 18, 2014 at 09:23:23AM +0000, Desai, Kashyap wrote: | Hi, | | Please find the latest patch for upstream commit. | | - This patch include all latest and greatest feature supported by | driver released at LSI external site. | - mfi vs mrsas interopt is resolved using latest commit which uses | tunable " hw.mfi.mrsas_enable". | | man page is still under re-work. I will be posting man | page as a follow up action item. | | Thanks, Kashyap | | > -----Original Message----- | > From: Doug Ambrisko [mailto:ambrisko@ambrisko.com] | > Sent: Saturday, January 25, 2014 12:31 AM | > To: Doug Ambrisko | > Cc: Desai, Kashyap; freebsd-scsi@freebsd.org; scottl@netflix.com; | > sean_bruno@yahoo.com; dwhite@ixsystems.com; jpaetzel@freebsd.org; | > Maloy, Joe; Mankani, Krishnaraddi; McConnell, Stephen; Saxena, Sumit; | > Radford, Adam; Kenneth D. Merry | > Subject: Re: LSI - MR-Fusion controller driver patch and man page | > | > On Fri, Jan 24, 2014 at 10:53:56AM -0800, Doug Ambrisko wrote: | > | On Tue, Jan 07, 2014 at 10:11:39AM -0800, Doug Ambrisko wrote: | > | [snip] | > | | Yes, we can probably make the minimal change to mfi to allow mrsas | > | | to optionally take over. That can probably be done the quickest. | > | | > | Here is the patch I propose to mfi(4) to allow mrsas(4) to optionally | > | take newer cards. | > | > I noticed that this patch is partially incomplete since I didn't have | > FLAGS_MRSAS added to all of the TBOLT ID's. I'll fix that in the commit. | > | > | Index: mfi_pci.c | > | | > ========================================================== | > ========= | > | --- mfi_pci.c (revision 260231) | > | +++ mfi_pci.c (working copy) | > | @@ -112,6 +112,11 @@ | > | SYSCTL_INT(_hw_mfi, OID_AUTO, msi, CTLFLAG_RDTUN, &mfi_msi, 0, | > | "Enable use of MSI interrupts"); | > | | > | +static int mfi_mrsas_enable = 0; | > | +TUNABLE_INT("hw.mfi.mrsas_enable", &mfi_msi); SYSCTL_INT(_hw_mfi, | > | +OID_AUTO, mrsas_enable, CTLFLAG_RDTUN, &mfi_mrsas_enable, | > | + 0, "Allow mrasas to take newer cards"); | > | + | > | struct mfi_ident { | > | uint16_t vendor; | > | uint16_t device; | > | @@ -127,11 +132,11 @@ | > | {0x1000, 0x005b, 0x1028, 0x1f34, MFI_FLAGS_SKINNY| | > MFI_FLAGS_TBOLT, "Dell PERC H710P Mini (monolithics)"}, | > | {0x1000, 0x005b, 0x1028, 0x1f35, MFI_FLAGS_SKINNY| | > MFI_FLAGS_TBOLT, "Dell PERC H710 Adapter"}, | > | {0x1000, 0x005b, 0x1028, 0x1f37, MFI_FLAGS_SKINNY| | > MFI_FLAGS_TBOLT, "Dell PERC H710 Mini (blades)"}, | > | - {0x1000, 0x005b, 0x1028, 0x1f38, MFI_FLAGS_SKINNY| | > MFI_FLAGS_TBOLT, "Dell PERC H710 Mini (monolithics)"}, | > | - {0x1000, 0x005b, 0x8086, 0x9265, MFI_FLAGS_SKINNY| | > MFI_FLAGS_TBOLT, "Intel (R) RAID Controller RS25DB080"}, | > | - {0x1000, 0x005b, 0x8086, 0x9285, MFI_FLAGS_SKINNY| | > MFI_FLAGS_TBOLT, "Intel (R) RAID Controller RS25NB008"}, | > | - {0x1000, 0x005b, 0xffff, 0xffff, MFI_FLAGS_SKINNY| | > MFI_FLAGS_TBOLT, "ThunderBolt"}, | > | - {0x1000, 0x005d, 0xffff, 0xffff, MFI_FLAGS_SKINNY| | > MFI_FLAGS_TBOLT, "Invader"}, | > | + {0x1000, 0x005b, 0x1028, 0x1f38, MFI_FLAGS_SKINNY| | > MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Mini | > (monolithics)"}, | > | + {0x1000, 0x005b, 0x8086, 0x9265, MFI_FLAGS_SKINNY| | > MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Intel (R) RAID Controller | > RS25DB080"}, | > | + {0x1000, 0x005b, 0x8086, 0x9285, MFI_FLAGS_SKINNY| | > MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Intel (R) RAID Controller | > RS25NB008"}, | > | + {0x1000, 0x005b, 0xffff, 0xffff, MFI_FLAGS_SKINNY| | > MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "ThunderBolt"}, | > | + {0x1000, 0x005d, 0xffff, 0xffff, MFI_FLAGS_SKINNY| | > MFI_FLAGS_TBOLT| | > | +MFI_FLAGS_MRSAS, "Invader"}, | > | {0x1000, 0x0060, 0x1028, 0xffff, MFI_FLAGS_1078, "Dell PERC 6"}, | > | {0x1000, 0x0060, 0xffff, 0xffff, MFI_FLAGS_1078, "LSI MegaSAS | > 1078"}, | > | {0x1000, 0x0071, 0xffff, 0xffff, MFI_FLAGS_SKINNY, "Drake Skinny"}, | > | @@ -178,7 +183,13 @@ | > | | > | if ((id = mfi_find_ident(dev)) != NULL) { | > | device_set_desc(dev, id->desc); | > | - return (BUS_PROBE_DEFAULT); | > | + | > | + /* give priority to mrsas if tunable set */ | > | + TUNABLE_INT_FETCH("hw.mfi.mrsas_enable", | > &mfi_mrsas_enable); | > | + if ((id->flags & MFI_FLAGS_MRSAS) && mfi_mrsas_enable) | > | + return (BUS_PROBE_LOW_PRIORITY); | > | + else | > | + return (BUS_PROBE_DEFAULT); | > | } | > | return (ENXIO); | > | } | > | Index: mfivar.h | > | | > ========================================================== | > ========= | > | --- mfivar.h (revision 260231) | > | +++ mfivar.h (working copy) | > | @@ -199,6 +199,7 @@ | > | #define MFI_FLAGS_GEN2 (1<<6) | > | #define MFI_FLAGS_SKINNY (1<<7) | > | #define MFI_FLAGS_TBOLT (1<<8) | > | +#define MFI_FLAGS_MRSAS (1<<9) | > | // Start: LSIP200113393 | > | bus_dma_tag_t verbuf_h_dmat; | > | bus_dmamap_t verbuf_h_dmamap; | > | | > | This creates a hw.mfi.mrsas_enable tunable to control it. The method | > | via hints wasn't the best since for one the unit index was being | > | abused a non-unit specfic option. It was also a little strange to | > | have mrsas hint be in mfi(4). | > | | > | Then we need a minor change to mrsas.c | > | | > | | > | --- ../mrsas.orig/mrsas.c 2014-01-03 11:30:28.000000000 -0800 | > | +++ ./mrsas.c 2014-01-24 10:43:20.000000000 -0800 | > | @@ -328,25 +328,11 @@ static struct mrsas_ident * mrsas_find_i static | > | int mrsas_probe(device_t dev) { | > | struct mrsas_ident *id; | > | - unsigned int force = 0, ivar; | > | | > | if ((id = mrsas_find_ident(dev)) != NULL) { | > | - if (id->device == 0x005b || id->device == 0x005d) { | > | - resource_int_value("mrsas", 0, "fusion_force", &ivar); | > | - | > | - if (ivar == 0 || ivar == 1) | > | - force = ivar; | > | - | > | - device_set_desc(dev, id->desc); | > | - if (force) | > | - return (BUS_PROBE_DEFAULT); | > | - //return (BUS_PROBE_SPECIFIC); //give priority to MFI driver | > | - else | > | - return (BUS_PROBE_LOW_PRIORITY); | > | - } | > | - else | > | - device_set_desc(dev, id->desc); | > | - return (BUS_PROBE_DEFAULT); | > | + device_set_desc(dev, id->desc); | > | + /* between BUS_PROBE_DEFAULT and BUS_PROBE_LOW_PRIORITY | > */ | > | + return (-30); | > | } | > | return (ENXIO); | > | | > | So that its probe part way between mfi(4) results and then it doesn't | > | have to change. | > | | > | If no one has concerns then I'll check in the mfi(4) change. | > | > Thanks, | > | > Doug A. |