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:   Tue, 14 Nov 2017 22:05:09 +0900 (KST)
From:   David Miller <davem@...emloft.net>
To:     niklas.cassel@...s.com
Cc:     peppe.cavallaro@...com, alexandre.torgue@...com, niklass@...s.com,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2] net: stmmac: fix LPI transitioning for
 dwmac4

From: Niklas Cassel <niklas.cassel@...s.com>
Date: Tue, 14 Nov 2017 11:15:54 +0100

> The LPI transitioning logic in stmmac_main uses
> priv->tx_path_in_lpi_mode to enter/exit LPI.
> 
> However, priv->tx_path_in_lpi_mode is assigned
> using the return value from host_irq_status().
> 
> So for dwmac4, priv->tx_path_in_lpi_mode was always false,
> so stmmac_tx_clean() would always try to put us in eee mode,
> and stmmac_xmit() would never take us out of eee mode.
> 
> To fix this, make host_irq_status() read and return the LPI
> irq status also for dwmac4.
> 
> This also increments the existing LPI counters, so that
> ethtool --statistics shows LPI transitions also for dwmac4.
> 
> For dwmac1000, irqs are enabled/disabled using the register
> named "Interrupt Mask Register", and thus setting a bit disables
> that specific irq.
> 
> For dwmac4 the matching register is named "MAC_Interrupt_Enable",
> and thus setting a bit enables that specific irq.
> 
> Looking at dwmac1000_core.c, the irqs that are always enabled are:
> LPI and PMT.
> 
> Looking at dwmac4_core.c, the irqs that are always enabled are:
> PMT.
> 
> To be able to read the LPI irq status, we need to enable the LPI
> irq also for dwmac4.
> 
> Signed-off-by: Niklas Cassel <niklas.cassel@...s.com>

Applied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ