linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] compile fix for dl2k
@ 2002-08-04 16:07 Matthew Wilcox
  2002-08-04 17:32 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox @ 2002-08-04 16:07 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel


synchronise_irq now takes an argument.
it was using set_bit / test_bit inappropriately.

diff -urpNX dontdiff linux-2.5.30/drivers/net/dl2k.c linux-2.5.30-willy/drivers/net/dl2k.c
--- linux-2.5.30/drivers/net/dl2k.c	2002-06-20 16:53:51.000000000 -0600
+++ linux-2.5.30-willy/drivers/net/dl2k.c	2002-08-04 08:23:47.000000000 -0600
@@ -1108,7 +1108,6 @@ set_multicast (struct net_device *dev)
 	u16 rx_mode = 0;
 	int i;
 	int bit;
-	int index, crc;
 	struct dev_mc_list *mclist;
 	struct netdev_private *np = dev->priv;
 	
@@ -1130,13 +1129,14 @@ set_multicast (struct net_device *dev)
 		for (i=0, mclist = dev->mc_list; mclist && i < dev->mc_count; 
 			i++, mclist=mclist->next) {
 
-			crc = ether_crc_le (ETH_ALEN, mclist->dmi_addr);
+			int index = 0;
+			int crc = ether_crc_le (ETH_ALEN, mclist->dmi_addr);
 
 			/* The inverted high significant 6 bits of CRC are
 			   used as an index to hashtable */
-			for (index = 0, bit = 0; bit < 6; bit++)
-				if (test_bit(31 - bit, &crc))
-					set_bit(bit, &index);
+			for (bit = 0; bit < 6; bit++)
+				if (crc & (1 << (31 - bit)))
+					index |= (1 << bit);
 
 			hash_table[index / 32] |= (1 << (index % 32));
 		}
@@ -1635,7 +1635,7 @@ rio_close (struct net_device *dev)
 
 	/* Stop Tx and Rx logics */
 	writel (TxDisable | RxDisable | StatsDisable, ioaddr + MACCtrl);
-	synchronize_irq ();
+	synchronize_irq (dev->irq);
 	free_irq (dev->irq, dev);
 	del_timer_sync (&np->timer);
 	

-- 
Revolutions do not require corporate support.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] compile fix for dl2k
  2002-08-04 16:07 [PATCH] compile fix for dl2k Matthew Wilcox
@ 2002-08-04 17:32 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2002-08-04 17:32 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Linus Torvalds, linux-kernel

Matthew Wilcox wrote:
> synchronise_irq now takes an argument.
> it was using set_bit / test_bit inappropriately.
> 
> diff -urpNX dontdiff linux-2.5.30/drivers/net/dl2k.c linux-2.5.30-willy/drivers/net/dl2k.c
> --- linux-2.5.30/drivers/net/dl2k.c	2002-06-20 16:53:51.000000000 -0600
> +++ linux-2.5.30-willy/drivers/net/dl2k.c	2002-08-04 08:23:47.000000000 -0600
> @@ -1108,7 +1108,6 @@ set_multicast (struct net_device *dev)
>  	u16 rx_mode = 0;
>  	int i;
>  	int bit;
> -	int index, crc;
>  	struct dev_mc_list *mclist;
>  	struct netdev_private *np = dev->priv;
>  	
> @@ -1130,13 +1129,14 @@ set_multicast (struct net_device *dev)
>  		for (i=0, mclist = dev->mc_list; mclist && i < dev->mc_count; 
>  			i++, mclist=mclist->next) {
>  
> -			crc = ether_crc_le (ETH_ALEN, mclist->dmi_addr);
> +			int index = 0;
> +			int crc = ether_crc_le (ETH_ALEN, mclist->dmi_addr);
>  
>  			/* The inverted high significant 6 bits of CRC are
>  			   used as an index to hashtable */
> -			for (index = 0, bit = 0; bit < 6; bit++)
> -				if (test_bit(31 - bit, &crc))
> -					set_bit(bit, &index);
> +			for (bit = 0; bit < 6; bit++)
> +				if (crc & (1 << (31 - bit)))
> +					index |= (1 << bit);
>  
>  			hash_table[index / 32] |= (1 << (index % 32));
>  		}

patch applied


> @@ -1635,7 +1635,7 @@ rio_close (struct net_device *dev)
>  
>  	/* Stop Tx and Rx logics */
>  	writel (TxDisable | RxDisable | StatsDisable, ioaddr + MACCtrl);
> -	synchronize_irq ();
> +	synchronize_irq (dev->irq);
>  	free_irq (dev->irq, dev);
>  	del_timer_sync (&np->timer);


patch already applied, dropping hunk

	Jeff



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-04 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-04 16:07 [PATCH] compile fix for dl2k Matthew Wilcox
2002-08-04 17:32 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).