From: Andrew Lunn <andrew@lunn.ch>
To: Razvan Stefanescu <razvan.stefanescu@nxp.com>
Cc: devel@driverdev.osuosl.org, arnd@arndb.de,
gregkh@linuxfoundation.org, ioana.ciornei@nxp.com,
alexandru.marginean@nxp.com, agraf@suse.de,
linux-kernel@vger.kernel.org, stuyoder@gmail.com,
netdev@vger.kernel.org, laurentiu.tudor@nxp.com
Subject: Re: [PATCH v4 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver
Date: Mon, 12 Mar 2018 15:29:40 +0100 [thread overview]
Message-ID: <20180312142940.GA21068@lunn.ch> (raw)
In-Reply-To: <20180312084955.12686-3-razvan.stefanescu@nxp.com>
On Mon, Mar 12, 2018 at 03:49:51AM -0500, Razvan Stefanescu wrote:
> +static irqreturn_t ethsw_irq0_handler(int irq_num, void *arg)
> +{
> + return IRQ_WAKE_THREAD;
> +}
> +
> +static int ethsw_setup_irqs(struct fsl_mc_device *sw_dev)
> +{
> + struct device *dev = &sw_dev->dev;
> + struct ethsw_core *ethsw = dev_get_drvdata(dev);
> + u32 mask = DPSW_IRQ_EVENT_LINK_CHANGED;
> + struct fsl_mc_device_irq *irq;
> + int err;
> +
> + err = fsl_mc_allocate_irqs(sw_dev);
> + if (err) {
> + dev_err(dev, "MC irqs allocation failed\n");
> + return err;
> + }
> +
> + if (WARN_ON(sw_dev->obj_desc.irq_count != DPSW_IRQ_NUM)) {
> + err = -EINVAL;
> + goto free_irq;
> + }
> +
> + err = dpsw_set_irq_enable(ethsw->mc_io, 0, ethsw->dpsw_handle,
> + DPSW_IRQ_INDEX_IF, 0);
> + if (err) {
> + dev_err(dev, "dpsw_set_irq_enable err %d\n", err);
> + goto free_irq;
> + }
> +
> + irq = sw_dev->irqs[DPSW_IRQ_INDEX_IF];
> +
> + err = devm_request_threaded_irq(dev, irq->msi_desc->irq,
> + ethsw_irq0_handler,
> + ethsw_irq0_handler_thread,
> + IRQF_NO_SUSPEND | IRQF_ONESHOT,
> + dev_name(dev), dev);
Hi Razvan
You can pass NULL instead of ethsw_irq0_handler.
Andrew
next prev parent reply other threads:[~2018-03-12 14:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-12 8:49 [PATCH v4 0/6] staging: Introduce DPAA2 Ethernet Switch driver Razvan Stefanescu
2018-03-12 8:49 ` [PATCH v4 1/6] staging: fsl-dpaa2/ethsw: Add APIs for DPSW object Razvan Stefanescu
2018-03-12 8:49 ` [PATCH v4 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver Razvan Stefanescu
2018-03-12 14:29 ` Andrew Lunn [this message]
2018-03-12 14:36 ` Andrew Lunn
2018-03-13 5:51 ` Razvan Stefanescu
2018-03-12 8:49 ` [PATCH v4 3/6] staging: fsl-dpaa2/ethsw: Add ethtool support Razvan Stefanescu
2018-03-12 8:49 ` [PATCH v4 4/6] staging: fsl-dpaa2/ethsw: Add maintainer for Ethernet Switch driver Razvan Stefanescu
2018-03-12 8:49 ` [PATCH v4 5/6] staging: fsl-dpaa2/ethsw: Add README Razvan Stefanescu
2018-03-12 8:49 ` [PATCH v4 6/6] staging: fsl-dpaa2/ethsw: Add TODO Razvan Stefanescu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180312142940.GA21068@lunn.ch \
--to=andrew@lunn.ch \
--cc=agraf@suse.de \
--cc=alexandru.marginean@nxp.com \
--cc=arnd@arndb.de \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=ioana.ciornei@nxp.com \
--cc=laurentiu.tudor@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=razvan.stefanescu@nxp.com \
--cc=stuyoder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).