* [PATCH] ide: fix crash at boot with siimage driver
@ 2008-04-29 4:49 Benjamin Herrenschmidt
2008-04-29 15:01 ` Sergei Shtylyov
0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2008-04-29 4:49 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: Sergei Shtylyov, Linux Kernel list, list linux-ide
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.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
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 = {
+ .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) \
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ide: fix crash at boot with siimage driver
2008-04-29 4:49 [PATCH] ide: fix crash at boot with siimage driver Benjamin Herrenschmidt
@ 2008-04-29 15:01 ` Sergei Shtylyov
2008-04-29 20:53 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2008-04-29 15:01 UTC (permalink / raw)
To: benh; +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 <benh@kernel.crashing.org>
> ---
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ide: fix crash at boot with siimage driver
2008-04-29 15:01 ` Sergei Shtylyov
@ 2008-04-29 20:53 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-04-29 20:53 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: benh, Linux Kernel list, list linux-ide
On Tuesday 29 April 2008, Sergei Shtylyov wrote:
> 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 <benh@kernel.crashing.org>
Applied, thanks for fixing it.
> > ---
>
> > 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?
Thanks for noticing, I took care of it while merging the patch.
> > + .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) \
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-29 20:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-29 4:49 [PATCH] ide: fix crash at boot with siimage driver Benjamin Herrenschmidt
2008-04-29 15:01 ` Sergei Shtylyov
2008-04-29 20:53 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).