[BUG, bisected] atmel_spi: hard lockups in transfer - Kernel

This is a discussion on [BUG, bisected] atmel_spi: hard lockups in transfer - Kernel ; Hi, For some weeks now there have been reports flying across the main AVR32 support forum, avrfreaks [1], that atmel_spi now hard-hangs on most transfers. The behaviour is not apparent in .23 and is in .24+. One tester was good ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: [BUG, bisected] atmel_spi: hard lockups in transfer

  1. [BUG, bisected] atmel_spi: hard lockups in transfer

    Hi,

    For some weeks now there have been reports flying across the main AVR32
    support forum, avrfreaks [1], that atmel_spi now hard-hangs on most
    transfers. The behaviour is not apparent in .23 and is in .24+. One
    tester was good enough to bisect the problem and turned up

    154443c72f47169ebcb3a7befbff0e934c49bff3
    atmel_spi: chain DMA transfers

    as the culprit. The tester also had to revert

    commit 8bacb219018a52e6f02a3cff6a7badf102ddfc44
    atmel_spi: fix dmachain oops with DEBUG enabled

    when they reverted 154443 as they were not confident enough to resolve
    the conflicts that resulted from just reverting the first one.

    The discussion thread involving this can be seen at [2].

    As I say, this is present in .24+ so any fix will be a stable candidate
    as well as .25 material (if we haven't missed the boat by then).

    Thanks,
    --Ben.

    [1] http://www.avrfreaks.net
    [2]
    http://www.avrfreaks.net/index.php?n...f35b0cda643ffc
    --
    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/

  2. Re: [BUG, bisected] atmel_spi: hard lockups in transfer

    On Sun, 06 Apr 2008 09:28:38 +1000
    Ben Nizette wrote:

    > Hi,
    >
    > For some weeks now there have been reports flying across the main AVR32
    > support forum, avrfreaks [1], that atmel_spi now hard-hangs on most
    > transfers. The behaviour is not apparent in .23 and is in .24+. One
    > tester was good enough to bisect the problem and turned up


    Thanks for reporting this.

    > 154443c72f47169ebcb3a7befbff0e934c49bff3
    > atmel_spi: chain DMA transfers
    >
    > as the culprit. The tester also had to revert
    >
    > commit 8bacb219018a52e6f02a3cff6a7badf102ddfc44
    > atmel_spi: fix dmachain oops with DEBUG enabled
    >
    > when they reverted 154443 as they were not confident enough to resolve
    > the conflicts that resulted from just reverting the first one.


    That is indeed the correct way to resolve the conflict since the latter
    fixes a bug introduced by the former.

    > The discussion thread involving this can be seen at [2].
    >
    > As I say, this is present in .24+ so any fix will be a stable candidate
    > as well as .25 material (if we haven't missed the boat by then).


    I'm afraid I don't have much time to look at this right now...but I'll
    see what I can do. It's strange that I never noticed this problem
    myself -- I did see some overrun issues, but I blamed it on the
    throughput improvements and just reduced the speed slightly.

    Do you have any special debugging options enabled?

    Haavard
    --
    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/

  3. Re: [BUG, bisected] atmel_spi: hard lockups in transfer

    > For some weeks now there have been reports flying across the main AVR32
    > support forum, avrfreaks [1], that atmel_spi now hard-hangs on most
    > transfers. The behaviour is not apparent in .23 and is in .24+. One
    > tester was good enough to bisect the problem and turned up
    >
    > 154443c72f47169ebcb3a7befbff0e934c49bff3
    > atmel_spi: chain DMA transfers
    >
    > as the culprit.


    Thanks for reporting this. Unfortunately it is difficult to test for
    me, since I do not have the hardware and there are no error messages.
    However, if you add the following line

    #define DEBUG

    to the top of drivers/spi/atmel_spi.c (before the #include directives)
    and recompile the kernel, then you would get lots of debug output
    which could help us pinpoint the problem.

    Szilveszter
    --
    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/

  4. Re: [BUG, bisected] atmel_spi: hard lockups in transfer


    On Mon, 2008-04-07 at 02:24 +0200, Szilveszter Ordog wrote:
    > However, if you add the following line
    >
    > #define DEBUG
    >
    > to the top of drivers/spi/atmel_spi.c (before the #include directives)
    > and recompile the kernel, then you would get lots of debug output
    > which could help us pinpoint the problem.
    >


    Right, I've attached the output from dmesg from the tester after he
    added #define DEBUG to the top of atmel_spi.c. I don't know how helpful
    it's going to be though, to my (untrained) eye everything looks in
    order. I've also attached the config.

    We have seen the problem reported across many SPI usages though in this
    case the tester has serial flash connected over SPI as an MTD. Without
    the #define DEBUG in there the board would hang while trying to mount
    that device. With the #define in place the mount succeeds but a hang is
    observed when trying to do anything with the device, eg ls.

    And to clarify, I don't have the issue myself, I've just been helping
    the tester debug the problem. He's now be added to the CC so we can get
    some more direct communications :-)

    Thanks,
    --Ben.


  5. Re: [BUG, bisected] atmel_spi: hard lockups in transfer

    On Monday 07 April 2008, Haavard Skinnemoen wrote:
    > On Sun, 06 Apr 2008 09:28:38 +1000
    > Ben Nizette wrote:
    >
    > > Hi,
    > >
    > > For some weeks now there have been reports flying across the main AVR32
    > > support forum, avrfreaks [1], that atmel_spi now hard-hangs on most
    > > transfers. The behaviour is not apparent in .23 and is in .24+. One
    > > tester was good enough to bisect the problem and turned up

    >
    > Thanks for reporting this.
    >
    > > 154443c72f47169ebcb3a7befbff0e934c49bff3
    > > atmel_spi: chain DMA transfers
    > >
    > > as the culprit. The tester also had to revert
    > >
    > > commit 8bacb219018a52e6f02a3cff6a7badf102ddfc44
    > > atmel_spi: fix dmachain oops with DEBUG enabled
    > >
    > > when they reverted 154443 as they were not confident enough to resolve
    > > the conflicts that resulted from just reverting the first one.

    >
    > That is indeed the correct way to resolve the conflict since the latter
    > fixes a bug introduced by the former.
    >
    > > The discussion thread involving this can be seen at [2].
    > >
    > > As I say, this is present in .24+ so any fix will be a stable candidate
    > > as well as .25 material (if we haven't missed the boat by then).

    mainline .24+ is not affected (linux-2.6.24.3.atmel.3.tar.bz2 is).

    >
    > I'm afraid I don't have much time to look at this right now...but I'll
    > see what I can do. It's strange that I never noticed this problem
    > myself -- I did see some overrun issues, but I blamed it on the
    > throughput improvements and just reduced the speed slightly.

    This patch seems to have problems at least on avr32, since this is only
    a speed-up patch, we should revert them.

    Regards

    Marc

    --
    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/

  6. Re: [BUG, bisected] atmel_spi: hard lockups in transfer


    On Wed, 2008-04-09 at 14:00 +0200, Marc Pignat wrote:
    > > Ben Nizette wrote:
    > >
    > > As I say, this is present in .24+ so any fix will be a stable candidate
    > > as well as .25 material (if we haven't missed the boat by then).

    > mainline .24+ is not affected (linux-2.6.24.3.atmel.3.tar.bz2 is).
    >


    Hmm, I was sure I'd seen reports on vanilla kernels too. I've confirmed
    it's present in avr32-2.6.git/master/HEAD and the patch is in mainline
    so I would expect the bug to be there, even if the symptoms are lacking.
    Adding #define DEBUG to the top of atmel_spi.c changed the point at
    which the bug triggers, there may be a similar coincidental
    alignment-of-the-planets in mainline which means this bug doesn't
    trigger at all.

    Hmm..

    > >
    > > I'm afraid I don't have much time to look at this right now...but I'll
    > > see what I can do. It's strange that I never noticed this problem
    > > myself -- I did see some overrun issues, but I blamed it on the
    > > throughput improvements and just reduced the speed slightly.

    > This patch seems to have problems at least on avr32, since this is only
    > a speed-up patch, we should revert them.


    I would think that's a good move in the short term but obviously speed
    is a good thing and I would really like to see us get to the bottom of
    this :-)

    --Ben.

    --
    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/

+ Reply to Thread