Bug 13026 - cs5536 is broken
Summary: cs5536 is broken
Status: CLOSED CODE_FIX
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: IDE (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Sergei Shtylyov
URL:
Keywords:
Depends on:
Blocks: 12398
  Show dependency tree
 
Reported: 2009-04-06 20:34 UTC by Rafael J. Wysocki
Modified: 2009-04-26 10:54 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.29.1
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Rafael J. Wysocki 2009-04-06 20:34:21 UTC
Subject    : 2.6.29.1 BUG: unable to handle kernel NULL pointer dereference at (null)
Submitter  : Arnd Hannemann <hannemann@nets.rwth-aachen.de>
Date       : 2009-04-06 18:11
References : http://marc.info/?l=linux-kernel&m=123904159829771&w=4
Handled-By : Sergei Shtylyov <sshtylyov@ru.mvista.com>
Patch      : http://marc.info/?l=linux-kernel&m=123904273731477&w=4

This entry is being used for tracking a regression from 2.6.28.  Please don't
close it until the problem is fixed in the mainline.
Comment 1 Sergei Shtylyov 2009-04-06 20:42:47 UTC
(In reply to comment #0)
> Subject    : 2.6.29.1 BUG: unable to handle kernel NULL pointer dereference
> at
> (null)
> Submitter  : Arnd Hannemann <hannemann@nets.rwth-aachen.de>
> Date       : 2009-04-06 18:11
> References : http://marc.info/?l=linux-kernel&m=123904159829771&w=4
> Handled-By : Sergei Shtylyov <sshtylyov@ru.mvista.com>
> Patch      : http://marc.info/?l=linux-kernel&m=123904273731477&w=4
> 
> This entry is being used for tracking a regression from 2.6.28.  Please don't
> close it until the problem is fixed in the mainline.

This is not a regression from 2.6.28 -- the driver just wasn't there at this time, it only got merged in 2.6.29 timeframe. It's not even a regression from 2.6.29 -- the driver was merged already broken. :-)
Comment 2 Bartlomiej Zolnierkiewicz 2009-04-06 21:32:47 UTC
On Monday 06 April 2009, bugzilla-daemon@bugzilla.kernel.org wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=13026
> 
> 
> Sergei Shtylyov <sshtylyov@ru.mvista.com> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |bzolnier@gmail.com,
>                    |                            |sshtylyov@ru.mvista.com
>          AssignedTo|io_ide@kernel-bugs.osdl.org |sshtylyov@ru.mvista.com
> 
> 
> 
> 
> --- Comment #1 from Sergei Shtylyov <sshtylyov@ru.mvista.com>  2009-04-06
> 20:42:47 ---
> (In reply to comment #0)
> > Subject    : 2.6.29.1 BUG: unable to handle kernel NULL pointer dereference
> at
> > (null)
> > Submitter  : Arnd Hannemann <hannemann@nets.rwth-aachen.de>
> > Date       : 2009-04-06 18:11
> > References : http://marc.info/?l=linux-kernel&m=123904159829771&w=4
> > Handled-By : Sergei Shtylyov <sshtylyov@ru.mvista.com>
> > Patch      : http://marc.info/?l=linux-kernel&m=123904273731477&w=4
> > 
> > This entry is being used for tracking a regression from 2.6.28.  Please
> don't
> > close it until the problem is fixed in the mainline.
> 
> This is not a regression from 2.6.28 -- the driver just wasn't there at this
> time, it only got merged in 2.6.29 timeframe. It's not even a regression from
> 2.6.29 -- the driver was merged already broken. :-)

Looks like in-between being posted for review and being merged the driver
missed dma_sff_read_status move? :(
Comment 3 Bartlomiej Zolnierkiewicz 2009-04-16 19:39:17 UTC
On Monday 06 April 2009 22:42:48 bugzilla-daemon@bugzilla.kernel.org wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=13026
> 
> 
> Sergei Shtylyov <sshtylyov@ru.mvista.com> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |bzolnier@gmail.com,
>                    |                            |sshtylyov@ru.mvista.com
>          AssignedTo|io_ide@kernel-bugs.osdl.org |sshtylyov@ru.mvista.com
> 
> 
> 
> 
> --- Comment #1 from Sergei Shtylyov <sshtylyov@ru.mvista.com>  2009-04-06
> 20:42:47 ---
> (In reply to comment #0)
> > Subject    : 2.6.29.1 BUG: unable to handle kernel NULL pointer dereference
> at
> > (null)
> > Submitter  : Arnd Hannemann <hannemann@nets.rwth-aachen.de>
> > Date       : 2009-04-06 18:11
> > References : http://marc.info/?l=linux-kernel&m=123904159829771&w=4
> > Handled-By : Sergei Shtylyov <sshtylyov@ru.mvista.com>
> > Patch      : http://marc.info/?l=linux-kernel&m=123904273731477&w=4
> > 
> > This entry is being used for tracking a regression from 2.6.28.  Please
> don't
> > close it until the problem is fixed in the mainline.
> 
> This is not a regression from 2.6.28 -- the driver just wasn't there at this
> time, it only got merged in 2.6.29 timeframe. It's not even a regression from
> 2.6.29 -- the driver was merged already broken. :-)

Yeah... :-(
 
Arnd, please try this patch:

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] cs5336: add missing .dma_sff_read_status initialization

In between initial driver submission and its merge ->dma_sff_read_status
method was moved to struct ide_dma_ops.

Fixes bug #13026:

http://bugzilla.kernel.org/show_bug.cgi?id=13026

Reported-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/cs5536.c |    1 +
 1 file changed, 1 insertion(+)

Index: b/drivers/ide/cs5536.c
===================================================================
--- a/drivers/ide/cs5536.c
+++ b/drivers/ide/cs5536.c
@@ -236,6 +236,7 @@ static const struct ide_dma_ops cs5536_d
 	.dma_test_irq		= ide_dma_test_irq,
 	.dma_lost_irq		= ide_dma_lost_irq,
 	.dma_timer_expiry	= ide_dma_sff_timer_expiry,
+	.dma_sff_read_status	= ide_dma_sff_read_status,
 };
 
 static const struct ide_port_info cs5536_info = {
Comment 4 Sergei Shtylyov 2009-04-16 19:43:49 UTC
(In reply to comment #3)

> > This is not a regression from 2.6.28 -- the driver just wasn't there at
> this
> > time, it only got merged in 2.6.29 timeframe. It's not even a regression
> from
> > 2.6.29 -- the driver was merged already broken. :-)

> Yeah... :-(

> Arnd, please try this patch:

> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] cs5336: add missing .dma_sff_read_status initialization

Bart, I have already posted such patch at 04/07, haven't you received it? :-O
Comment 5 Bartlomiej Zolnierkiewicz 2009-04-16 21:16:03 UTC
On Thursday 16 April 2009 21:43:49 bugzilla-daemon@bugzilla.kernel.org wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=13026
> 
> 
> 
> 
> 
> --- Comment #4 from Sergei Shtylyov <sshtylyov@ru.mvista.com>  2009-04-16
> 19:43:49 ---
> (In reply to comment #3)
> 
> > > This is not a regression from 2.6.28 -- the driver just wasn't there at
> this
> > > time, it only got merged in 2.6.29 timeframe. It's not even a regression
> from
> > > 2.6.29 -- the driver was merged already broken. :-)
> 
> > Yeah... :-(
> 
> > Arnd, please try this patch:
> 
> > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > Subject: [PATCH] cs5336: add missing .dma_sff_read_status initialization
> 
> Bart, I have already posted such patch at 04/07, haven't you received it? :-O

After reading your comment I was actually thinking that you will do that
however I never received the patch and it wasn't in bugzilla...

Sigh, it is in my gmail's account but not in my inbox folder locally.

[ It must have happened when KMail crashed on me when I ran out of free
  disk space last week. ]

Sorry for confusion, I'll apply your version later.
Comment 6 Bernhard Schmidt 2009-04-19 22:37:40 UTC
I have the same issue with my ALIX2 board. Your patch doesn't apply cleanly to 2.6.29.1 (which still has the additional dma_timeout method), but manually adding that line at the end of struct ide_dma_ops fixes the problem for me.

Could this be backported to 2.6.29-stable?
Comment 7 Sergei Shtylyov 2009-04-20 08:11:59 UTC
(In reply to comment #6)

> I have the same issue with my ALIX2 board. Your patch doesn't apply cleanly
> to
> 2.6.29.1 (which still has the additional dma_timeout method), but manually
> adding that line at the end of struct ide_dma_ops fixes the problem for me.

> Could this be backported to 2.6.29-stable?

Sure, I have CC'ed stable@kernel.org on the patch.
Comment 8 Rafael J. Wysocki 2009-04-26 10:54:00 UTC
Fixed by commit 15da90b516e9da92cc1d90001e640fd6707d0e27 .

Note You need to log in before you can comment on or make changes to this bug.