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] [day] [month] [year] [list]
Date:	Wed, 9 Mar 2016 02:18:07 +0900
From:	Yoshihiro Kaneko <ykaneko0929@...il.com>
To:	netdev@...r.kernel.org
Cc:	"David S. Miller" <davem@...emloft.net>,
	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
	Simon Horman <horms@...ge.net.au>,
	Magnus Damm <magnus.damm@...il.com>,
	linux-renesas-soc@...r.kernel.org,
	Linux-sh list <linux-sh@...r.kernel.org>
Subject: Re: [PATCH/RFC v6 net-next] ravb: Add dma queue interrupt support

Hi Sergei-san,

2016-02-29 0:41 GMT+09:00 Yoshihiro Kaneko <ykaneko0929@...il.com>:

[snip]

> +static bool ravb_timestamp_interrupt(struct net_device *ndev, u32 tis)
> +{

I'd like to read TIS here like ravb_queue_interrupt().


> +       if (tis & TIS_TFUF) {
> +               ravb_write(ndev, ~TIS_TFUF, TIS);
> +               ravb_get_tx_tstamp(ndev);
> +               return true;
> +       }
> +       return false;
> +}

[snip]

> +/* Timestamp/Error/gPTP interrupt handler */
> +static irqreturn_t ravb_multi_interrupt(int irq, void *dev_id)
> +{
> +       struct net_device *ndev = dev_id;
> +       struct ravb_private *priv = netdev_priv(ndev);
> +       irqreturn_t result = IRQ_NONE;
> +       u32 iss, tis;
> +
> +       spin_lock(&priv->lock);
> +       /* Get interrupt status */
> +       iss = ravb_read(ndev, ISS);
> +
> +       /* Timestamp updated */
> +       if (iss & ISS_TFUS) {
> +               tis  = ravb_read(ndev, TIS);
> +               if (ravb_timestamp_interrupt(ndev, tis))
> +                       result = IRQ_HANDLED;
> +       }
> +
> +       /* Error status summary */
> +       if (iss & ISS_ES) {
> +               ravb_error_interrupt(ndev);
> +               result = IRQ_HANDLED;
> +       }
> +
> +       /* gPTP interrupt status summary */
> +       if (iss & ISS_CGIS)
> +               result = ravb_ptp_interrupt(ndev);

This assignment overwrites the result above.
How about this?
    if ((iss & ISS_CGIS) && ravb_ptp_interrupt(ndev) == IRQ_HANDLED)
            result = IRQ_HANDLED;


> +
> +       mmiowb();
> +       spin_unlock(&priv->lock);
> +       return result;
> +}
[snip]


Thanks,
kaneko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ