Skip to contentSkip to conversation

cs89x0 : packet reception not working

PATCH In review Jaccon Bastiaansen 2 participants 2 messages Aug 27, 2012 – Aug 31, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 cs89x0 : packet reception not working

The RxCFG register of the CS89x0 could be configured incorrectly (because of misplaced parentheses), resulting in the disabling of packet reception.

---
 drivers/net/ethernet/cirrus/cs89x0.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
drivers/net/ethernet/cirrus/cs89x0.c +5 -5
index 845b202..1384469 100644
@@ -1243,6 +1243,7 @@ static void set_multicast_list(struct net_device *dev)
 {
 	struct net_local *lp = netdev_priv(dev);
 	unsigned long flags;
+	u16 cfg;
 
 	spin_lock_irqsave(&lp->lock, flags);
 	if (dev->flags & IFF_PROMISC)
@@ -1260,11 +1261,10 @@ static void set_multicast_list(struct net_device *dev)
 	/* in promiscuous mode, we accept errored packets,
 	 * 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));
+	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);
 	spin_unlock_irqrestore(&lp->lock, flags);
 }
 
Signature · 1 line
1.7.1
maintainer
#1 lore raw

From: Jaccon Bastiaansen <[email protected]>
Date: Mon, 27 Aug 2012 23:53:51 +0200

Quoted 5 lines

The RxCFG register of the CS89x0 could be configured incorrectly (because of misplaced parentheses), resulting in the disabling of packet reception.

Applied and queued up for -stable, thanks.