cvs commit: src/sys/dev/dc if_dc.c

Nate Lawson nate at root.org
Wed Dec 28 09:00:17 PST 2005


Gleb Smirnoff wrote:
> glebius     2005-12-28 13:21:05 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/dev/dc           if_dc.c 
>   Log:
>   Check for IFF_DRV_RUNNING in the interrupt loop.
>   
>   Reported & tested by:   Martin P. Hansen <mph lima.dyndns.dk>
>   
>   Revision  Changes    Path
>   1.177     +3 -2      src/sys/dev/dc/if_dc.c
> 
> 
> Index: src/sys/dev/dc/if_dc.c
> diff -u src/sys/dev/dc/if_dc.c:1.176 src/sys/dev/dc/if_dc.c:1.177
> --- src/sys/dev/dc/if_dc.c:1.176	Mon Dec  5 12:32:20 2005
> +++ src/sys/dev/dc/if_dc.c	Wed Dec 28 13:21:05 2005
> @@ -3138,8 +3138,9 @@
>  	/* Disable interrupts. */
>  	CSR_WRITE_4(sc, DC_IMR, 0x00000000);
>  
> -	while (((status = CSR_READ_4(sc, DC_ISR)) & DC_INTRS)
> -	      && status != 0xFFFFFFFF) {
> +	while (((status = CSR_READ_4(sc, DC_ISR)) & DC_INTRS) &&
> +	    status != 0xFFFFFFFF &&
> +	    ifp->if_drv_flags & IFF_DRV_RUNNING) {
>  
>  		CSR_WRITE_4(sc, DC_ISR, status);
>  

Need parens around the if_drv_flags check.  This code is broken without it.

-- 
Nate


More information about the cvs-src mailing list