* [PATCH] [POWERPC] Fix viodasd driver with scatterlist debug
@ 2008-03-12 6:23 Benjamin Herrenschmidt
2008-03-12 6:44 ` Stephen Rothwell
0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2008-03-12 6:23 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
The iSeries viodasd drivers does some very strange things with
scatterlists, one of these causing a BUG_ON to trigger when
scatterlist debugging is enabled due to initializing the
scatterlist with memset instead of sg_init_table().
This fixes it by using sg_init_table(). The rest of the stuff
it does to that poor list is still pretty awful but it will work.
I may look into fixing things in a nicer way some other time.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
drivers/block/viodasd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- linux-work.orig/drivers/block/viodasd.c 2008-03-12 10:25:55.000000000 +1100
+++ linux-work/drivers/block/viodasd.c 2008-03-12 10:39:38.000000000 +1100
@@ -528,8 +528,7 @@ static int block_event_to_scatterlist(co
numsg = VIOMAXBLOCKDMA;
*total_len = 0;
- memset(sg, 0, sizeof(sg[0]) * VIOMAXBLOCKDMA);
-
+ sg_init_table(sg, VIOMAXBLOCKDMA);
for (i = 0; (i < numsg) && (rw_data->dma_info[i].len > 0); ++i) {
sg_dma_address(&sg[i]) = rw_data->dma_info[i].token;
sg_dma_len(&sg[i]) = rw_data->dma_info[i].len;
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] [POWERPC] Fix viodasd driver with scatterlist debug
2008-03-12 6:23 [PATCH] [POWERPC] Fix viodasd driver with scatterlist debug Benjamin Herrenschmidt
@ 2008-03-12 6:44 ` Stephen Rothwell
2008-03-12 6:52 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2008-03-12 6:44 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Paul Mackerras
[-- Attachment #1: Type: text/plain, Size: 645 bytes --]
Hi Ben,
On Wed, 12 Mar 2008 17:23:56 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> The iSeries viodasd drivers does some very strange things with
> scatterlists, one of these causing a BUG_ON to trigger when
> scatterlist debugging is enabled due to initializing the
> scatterlist with memset instead of sg_init_table().
>
> This fixes it by using sg_init_table(). The rest of the stuff
> it does to that poor list is still pretty awful but it will work.
Presumably this is also needed in 2.6.24.xx
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [POWERPC] Fix viodasd driver with scatterlist debug
2008-03-12 6:44 ` Stephen Rothwell
@ 2008-03-12 6:52 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2008-03-12 6:52 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev, Paul Mackerras
On Wed, 2008-03-12 at 17:44 +1100, Stephen Rothwell wrote:
> Hi Ben,
>
> On Wed, 12 Mar 2008 17:23:56 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> > The iSeries viodasd drivers does some very strange things with
> > scatterlists, one of these causing a BUG_ON to trigger when
> > scatterlist debugging is enabled due to initializing the
> > scatterlist with memset instead of sg_init_table().
> >
> > This fixes it by using sg_init_table(). The rest of the stuff
> > it does to that poor list is still pretty awful but it will work.
>
> Presumably this is also needed in 2.6.24.xx
Possibly, though the problem only occurs when enabling scatterlist
debug, which distros don't do. Is it worth putting in a stable release ?
If yes, I'll submit it as soon as it hits upstream.
Cheers,
Ben.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-12 6:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-12 6:23 [PATCH] [POWERPC] Fix viodasd driver with scatterlist debug Benjamin Herrenschmidt
2008-03-12 6:44 ` Stephen Rothwell
2008-03-12 6:52 ` Benjamin Herrenschmidt
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).