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: <20180904225955.GH29121@lunn.ch>
Date:   Wed, 5 Sep 2018 00:59:55 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     netdev@...r.kernel.org, vivien.didelot@...oirfairelinux.com,
        davem@...emloft.net
Subject: Re: [PATCH net-next 2/5] net: dsa: b53: Make SRAB driver manage port
 interrupts

> +static irqreturn_t b53_srab_port_isr(int irq, void *dev_id)
> +{
> +	struct b53_srab_port_priv *port = dev_id;
> +	struct b53_device *dev = port->dev;
> +	struct b53_srab_priv *priv = dev->priv;
> +
> +	/* Acknowledge the interrupt */
> +	writel(BIT(port->num), priv->regs + B53_SRAB_INTR);
> +
> +	schedule_work(&port->irq_work);
> +
> +	return IRQ_HANDLED;
> +}
> +
> +static int b53_srab_irq_enable(struct b53_device *dev, int port)
> +{
> +	struct b53_srab_priv *priv = dev->priv;
> +	struct b53_srab_port_priv *p = &priv->port_intrs[port];
> +	int ret;
> +
> +	ret = request_irq(p->irq, b53_srab_port_isr, 0,
> +			  dev_name(dev->dev), p);

Hi Florian

Could you use a threaded interrupt? Save you from having to implement
your own work queue. I think you can have a function called in both
interrupt context in order to acknowledged the interrupt, and thread
context to do the remaining work.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ