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: <20180312142940.GA21068@lunn.ch>
Date:   Mon, 12 Mar 2018 15:29:40 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Razvan Stefanescu <razvan.stefanescu@....com>
Cc:     gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        agraf@...e.de, arnd@...db.de, alexandru.marginean@....com,
        ruxandra.radulescu@....com, ioana.ciornei@....com,
        laurentiu.tudor@....com, stuyoder@...il.com
Subject: Re: [PATCH v4 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2
 Ethernet Switch driver

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ