From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 11 21:12:10 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EF9DFCA; Tue, 11 Mar 2014 21:12:10 +0000 (UTC) Received: from mail-oa0-x231.google.com (mail-oa0-x231.google.com [IPv6:2607:f8b0:4003:c02::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4E456298; Tue, 11 Mar 2014 21:12:10 +0000 (UTC) Received: by mail-oa0-f49.google.com with SMTP id g12so9069386oah.22 for ; Tue, 11 Mar 2014 14:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Xqb+zCGHLc6QsEWFaPT0tiX7DeX5WvEARyM5nCzPA1E=; b=0Hpj3JPWJk0unfL+zNdQylwpTrdki8ZHBZQpEArj7t1eQqpEBy4VGSt2gCm01NRkje FMD0lOCOk7uPfhlvdAzl1why8758wNrwLVtQjouXPWPtf2dTcB4VxaMU/kVpeHHIoyeB /3jh2B2iFJf3dpiAwmssfAY5glqm3oVNCVZqC3kShcEqFxeo2rtxF+bJ+IvS5a+lYYAS EFh87JqfIyd847zlGtYwevGdCoF4ToZ8UYKXrDtwOF3UQVl2G7cupRjuo1pLipwxaXm3 hMIlOw4DLNYV8VaiCiVWza8uxWWPwvQF6fDMQ5ne6+XVWQrzmtF4ti5mRSuWk4PQpu1k +jXA== MIME-Version: 1.0 X-Received: by 10.182.233.201 with SMTP id ty9mr35663997obc.29.1394572329705; Tue, 11 Mar 2014 14:12:09 -0700 (PDT) Received: by 10.76.132.8 with HTTP; Tue, 11 Mar 2014 14:12:09 -0700 (PDT) In-Reply-To: <201402271330.02699.jhb@freebsd.org> References: <201402271330.02699.jhb@freebsd.org> Date: Tue, 11 Mar 2014 17:12:09 -0400 Message-ID: Subject: Re: [PATCH] Add MSI support to puc(9) From: Ryan Stone To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Mar 2014 21:12:10 -0000 On Thu, Feb 27, 2014 at 1:30 PM, John Baldwin wrote: > I would suggest reworking this so that you try MSI for all PCI devices. > I would do this by removing the 'sc_irid = 0' from puc_bfe_attach() so > that it can be set by callers. You could then add attach/detach routines in > puc_pci.c that use pci_alloc_msi() and set sc_irid to 1 if MSI works. The > sc_irid value would also work as a flag for knowing if detach needs to call > pci_release_msi() (or puc_pci_attach() handling failure in puc_bfe_attach()) > (though I wouldn't be opposed to keeping sc_msi as a separate flag). Thanks for the review. I have reworked the patch as requested. The new version can be found at the same path: http://people.freebsd.org/~rstone/patches/puc_msi.diff