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]
Date:	Mon, 06 Oct 2014 23:59:26 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	pgynther@...gle.com
Cc:	netdev@...r.kernel.org, f.fainelli@...il.com
Subject: Re: [PATCH net-next] net: bcmgenet: fix Tx ring priority
 programming

From: Petri Gynther <pgynther@...gle.com>
Date: Mon,  6 Oct 2014 17:50:01 -0700 (PDT)

> @@ -1731,11 +1744,12 @@ static void bcmgenet_init_multiq(struct net_device *dev)
>  	reg |= ring_cfg;
>  	bcmgenet_tdma_writel(priv, reg, DMA_RING_CFG);
>  
> -	/* Use configured rings priority and set ring #16 priority */
> -	reg = bcmgenet_tdma_readl(priv, DMA_RING_PRIORITY);
> -	reg |= ((GENET_Q0_PRIORITY + priv->hw_params->tx_queues) << 20);
> -	reg |= dma_priority;
> -	bcmgenet_tdma_writel(priv, reg, DMA_PRIORITY);
> +	/* Set ring 16 priority and program the hardware registers */
> +	dma_priority[2] |=
> +		((GENET_Q0_PRIORITY + priv->hw_params->tx_queues) << 20);

Please use "<< (16 - 12) * DMA_RING_BUF_PRIORITY_SHIFT" otherwise this
constant is magic.

You might, optionally, add macros for the subtraction adjustment each
priority register uses (0, 6, 12, respectively).
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ