Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1636279

Re: [PATCH v3 4/6] spi: sh-msiof: Add slave mode support

From Geert Uytterhoeven <geert@linux-m68k.org>
Newsgroups linux.kernel
Subject Re: [PATCH v3 4/6] spi: sh-msiof: Add slave mode support
Date 2017-05-05 11:50 +0200
Message-ID <tDI26-8l5-19@gated-at.bofh.it> (permalink)
References <tDt33-6JH-5@gated-at.bofh.it> <tDt34-6JH-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, May 4, 2017 at 7:45 PM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> From: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
>
> Add slave mode support to the MSIOF driver, in both PIO and DMA mode.
>
> For now this only supports the transmission of messages with a size
> that is known in advance.
>
> Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
> Signed-off-by: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>
> [geert: Timeout handling cleanup, spi core integration, cancellation,
>         rewording]
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

> index 2ce15ca977828668..7c4e8c4f3a9bddfd 100644
> --- a/drivers/spi/spi-sh-msiof.c
> +++ b/drivers/spi/spi-sh-msiof.c

> +static int sh_msiof_slave_abort(struct spi_master *master)
> +{
> +       struct sh_msiof_spi_priv *p = spi_master_get_devdata(master);
> +       unsigned long flags;
> +
> +       spin_lock_irqsave(&p->done.wait.lock, flags);
> +       if (!p->done.done) {
> +               wait_queue_t *curr, *next;
> +
> +               list_for_each_entry_safe(curr, next, &p->done.wait.task_list,
> +                                        task_list) {
> +                       signal_wake_up(curr->private, 1);

0day reported a build failure in the modular case (thanks!):

    ERROR: "signal_wake_up_state" [drivers/spi/spi-sh-msiof.ko] undefined!

signal_wake_up() is a static inline function calling signal_wake_up_state(),
but the latter is not exported to modules.

I'll bring it up with the scheduler people...

> +                       break;
> +               }
> +       }
> +       spin_unlock_irqrestore(&p->done.wait.lock, flags);
> +       return 0;
> +}

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/6] spi: Add slave mode support Geert Uytterhoeven <geert+renesas@glider.be> - 2017-05-04 19:50 +0200
  [PATCH v3 4/6] spi: sh-msiof: Add slave mode support Geert Uytterhoeven <geert+renesas@glider.be> - 2017-05-04 19:50 +0200
    Re: [PATCH v3 4/6] spi: sh-msiof: Add slave mode support Geert Uytterhoeven <geert@linux-m68k.org> - 2017-05-05 11:50 +0200
  [PATCH v3 6/6] spi: slave: Add SPI slave handler controlling system state Geert Uytterhoeven <geert+renesas@glider.be> - 2017-05-04 19:50 +0200
  [PATCH v3 5/6] spi: slave: Add SPI slave handler reporting uptime at previous message Geert Uytterhoeven <geert+renesas@glider.be> - 2017-05-04 19:50 +0200

csiph-web