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:	Sun, 26 Aug 2012 15:26:01 -0700
From:	Joe Perches <joe@...ches.com>
To:	Jaccon Bastiaansen <jaccon.bastiaansen@...il.com>
Cc:	davem@...emloft.net, linux-arm-kernel@...ts.infradead.org,
	netdev@...r.kernel.org, s.hauer@...gutronix.de, festevam@...il.com
Subject: Re: [PATCH] cs89x0 : packet reception not working

On Sun, 2012-08-26 at 23:39 +0200, Jaccon Bastiaansen wrote:
> The RxCFG register of the CS89x0 could be configured incorrectly
> (because of misplaced parentheses), resulting in the disabling
> of packet reception.

Thanks.

> diff --git a/drivers/net/ethernet/cirrus/cs89x0.c b/drivers/net/ethernet/cirrus/cs89x0.c
[]
> @@ -1261,10 +1261,10 @@ static void set_multicast_list(struct net_device *dev)
>  	 * so we have to enable interrupts on them also
>  	 */
>  	writereg(dev, PP_RxCFG,
> -		 (lp->curr_rx_cfg |
> -		  (lp->rx_mode == RX_ALL_ACCEPT)
> -		  ? (RX_CRC_ERROR_ENBL | RX_RUNT_ENBL | RX_EXTRA_DATA_ENBL)
> -		  : 0));
> +		 lp->curr_rx_cfg |
> +		 (lp->rx_mode == RX_ALL_ACCEPT
> +		 ? (RX_CRC_ERROR_ENBL | RX_RUNT_ENBL | RX_EXTRA_DATA_ENBL)
> +		 : 0));
>  	spin_unlock_irqrestore(&lp->lock, flags);
>  }

Perhaps it would be better to use something like:

	int cfg = lp->curr_rx_cfg;

	if (lp->rx_mode == RX_ALL_ACCEPT)
		cfg |= RX_CRC_ERROR_ENBL | RX_RUNT_ENBL | RX_EXTRA_DATA_ENBL;

	writereg(dev, PP_RxCFG, cfg);

--
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