Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751570AbbBPVj5 (ORCPT ); Mon, 16 Feb 2015 16:39:57 -0500 Received: from mail-qg0-f43.google.com ([209.85.192.43]:54737 "EHLO mail-qg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751277AbbBPVj4 (ORCPT ); Mon, 16 Feb 2015 16:39:56 -0500 MIME-Version: 1.0 In-Reply-To: <1424030062-8668-1-git-send-email-xerofoify@gmail.com> References: <1424030062-8668-1-git-send-email-xerofoify@gmail.com> From: Bjorn Helgaas Date: Mon, 16 Feb 2015 15:39:35 -0600 Message-ID: Subject: Re: [PATCH RESEND] x86:pci: Change sta2x11_dma_ops stucture to use switolb_dma_supported as it's dma_supported function in sta2x11-fixup.c To: Nicholas Krause Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "x86@kernel.org" , --cclinux-pci@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1646 Lines: 38 On Sun, Feb 15, 2015 at 1:54 PM, Nicholas Krause wrote: > This changes the structure sta2x11_dma_ops stucture to use switolb_dma_supported > as it's function for dma_supported hardware verus setting this value to NULL as > this should be set correctly for when dma_supported function needs to be called > for this hardware. Otherwise this will cause a bug that will crash a operation > needing to access this function if an intended hardware operation needs to call > it but the kernel has the function pointer for this structure set to NULL > incorrectly. > > Signed-off-by: Nicholas Krause > --- > arch/x86/pci/sta2x11-fixup.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/pci/sta2x11-fixup.c b/arch/x86/pci/sta2x11-fixup.c > index 5ceda85..d773a73 100644 > --- a/arch/x86/pci/sta2x11-fixup.c > +++ b/arch/x86/pci/sta2x11-fixup.c > @@ -191,7 +191,7 @@ static struct dma_map_ops sta2x11_dma_ops = { > .sync_sg_for_cpu = swiotlb_sync_sg_for_cpu, > .sync_sg_for_device = swiotlb_sync_sg_for_device, > .mapping_error = swiotlb_dma_mapping_error, > - .dma_supported = NULL, /* FIXME: we should use this instead! */ > + .dma_supported = switolb_dma_supported, I don't think this compiles. > }; > > /* At setup time, we use our own ops if the device is a ConneXt one */ > -- > 2.1.0 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/