lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPDyKFpP6xBru79Xh2oe=J8HWO3uk1VpcMzEiG6X7WX-AOvgkA@mail.gmail.com>
Date:   Fri, 16 Oct 2020 13:30:30 +0200
From:   Ulf Hansson <ulf.hansson@...aro.org>
To:     Jerome Pouiller <Jerome.Pouiller@...abs.com>
Cc:     linux-wireless <linux-wireless@...r.kernel.org>,
        netdev <netdev@...r.kernel.org>,
        driverdevel <devel@...verdev.osuosl.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Kalle Valo <kvalo@...eaurora.org>,
        "David S . Miller" <davem@...emloft.net>,
        DTML <devicetree@...r.kernel.org>,
        Rob Herring <robh+dt@...nel.org>
Subject: Re: [PATCH 07/23] wfx: add bus_sdio.c

On Mon, 12 Oct 2020 at 12:47, Jerome Pouiller
<Jerome.Pouiller@...abs.com> wrote:
>
> From: Jérôme Pouiller <jerome.pouiller@...abs.com>

Please fill out this commit message to explain a bit more about the
patch and the HW it enables support for.

>
> Signed-off-by: Jérôme Pouiller <jerome.pouiller@...abs.com>
> ---
>  drivers/net/wireless/silabs/wfx/bus_sdio.c | 269 +++++++++++++++++++++
>  1 file changed, 269 insertions(+)
>  create mode 100644 drivers/net/wireless/silabs/wfx/bus_sdio.c
>
> diff --git a/drivers/net/wireless/silabs/wfx/bus_sdio.c b/drivers/net/wireless/silabs/wfx/bus_sdio.c
> new file mode 100644
> index 000000000000..e06d7e1ebe9c

[...]

> +
> +static int wfx_sdio_irq_subscribe(void *priv)
> +{
> +       struct wfx_sdio_priv *bus = priv;
> +       u32 flags;
> +       int ret;
> +       u8 cccr;
> +

I would appreciate a comment about an out-of-band IRQ line. If it's
supported, that is the preferred option to use, else the SDIO IRQs.

> +       if (!bus->of_irq) {
> +               sdio_claim_host(bus->func);
> +               ret = sdio_claim_irq(bus->func, wfx_sdio_irq_handler);
> +               sdio_release_host(bus->func);
> +               return ret;
> +       }
> +
> +       sdio_claim_host(bus->func);
> +       cccr = sdio_f0_readb(bus->func, SDIO_CCCR_IENx, NULL);
> +       cccr |= BIT(0);
> +       cccr |= BIT(bus->func->num);
> +       sdio_f0_writeb(bus->func, cccr, SDIO_CCCR_IENx, NULL);
> +       sdio_release_host(bus->func);
> +       flags = irq_get_trigger_type(bus->of_irq);
> +       if (!flags)
> +               flags = IRQF_TRIGGER_HIGH;
> +       flags |= IRQF_ONESHOT;
> +       return devm_request_threaded_irq(&bus->func->dev, bus->of_irq, NULL,
> +                                        wfx_sdio_irq_handler_ext, flags,
> +                                        "wfx", bus);
> +}
> +

[...]

> +
> +#define SDIO_VENDOR_ID_SILABS        0x0000
> +#define SDIO_DEVICE_ID_SILABS_WF200  0x1000
> +static const struct sdio_device_id wfx_sdio_ids[] = {
> +       { SDIO_DEVICE(SDIO_VENDOR_ID_SILABS, SDIO_DEVICE_ID_SILABS_WF200) },
> +       // FIXME: ignore VID/PID and only rely on device tree
> +       // { SDIO_DEVICE(SDIO_ANY_ID, SDIO_ANY_ID) },
> +       { },
> +};
> +MODULE_DEVICE_TABLE(sdio, wfx_sdio_ids);

I will comment about the sdio IDs separately, replying to the other
thread between you and Pali.

> +
> +struct sdio_driver wfx_sdio_driver = {
> +       .name = "wfx-sdio",
> +       .id_table = wfx_sdio_ids,
> +       .probe = wfx_sdio_probe,
> +       .remove = wfx_sdio_remove,
> +       .drv = {
> +               .owner = THIS_MODULE,
> +               .of_match_table = wfx_sdio_of_match,
> +       }
> +};

I couldn't find where you call sdio_register|unregister_driver(), but
maybe that's done from another patch in series?

Kind regards
Uffe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ