From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Subject: Re: [PATCH] ide: fix crash at boot with siimage driver Date: Tue, 29 Apr 2008 19:01:32 +0400 Message-ID: <4817384C.8020905@ru.mvista.com> References: <1209444576.18023.128.camel@pasglop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from h155.mvista.com ([63.81.120.155]:20985 "EHLO imap.sh.mvista.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754708AbYD2PCM (ORCPT ); Tue, 29 Apr 2008 11:02:12 -0400 In-Reply-To: <1209444576.18023.128.camel@pasglop> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: benh@kernel.crashing.org Cc: Bartlomiej Zolnierkiewicz , Linux Kernel list , list linux-ide Hello. Benjamin Herrenschmidt wrote: > Some change to the IDE layer are causing the siimage driver to crash > at boot with a NULL dereference. This is due to the sil_dma_ops not > containing all the necessary pointers. I suppose it used to just > "override" the defaults while now, it needs to contain everything. Both the patch introducing 'struct ide_dma_ops' into drivers and making them 'const' were in the same batch. However, the latter patch (now commit f37afdaca711838b50ecd89b9c15fc745270d77c) erroneously missed siimage.c -- which I didn't notice when reviewing, sigh... > Signed-off-by: Benjamin Herrenschmidt > --- > Index: linux-work/drivers/ide/pci/siimage.c > =================================================================== > --- linux-work.orig/drivers/ide/pci/siimage.c 2008-04-29 14:44:37.000000000 +1000 > +++ linux-work/drivers/ide/pci/siimage.c 2008-04-29 14:44:44.000000000 +1000 > @@ -780,7 +780,14 @@ static const struct ide_port_ops sil_sat > }; > > static struct ide_dma_ops sil_dma_ops = { Could you please make this 'const' -- the same way as the mentioned commit does in other drivers? > + .dma_host_set = ide_dma_host_set, > + .dma_setup = ide_dma_setup, > + .dma_exec_cmd = ide_dma_exec_cmd, > + .dma_start = ide_dma_start, > + .dma_end = __ide_dma_end, > .dma_test_irq = siimage_dma_test_irq, > + .dma_timeout = ide_dma_timeout, > + .dma_lost_irq = ide_dma_lost_irq, > }; > > #define DECLARE_SII_DEV(name_str, p_ops) \ MBR, Sergei