Re: [RFC/PATCH] Fixes for ULi5261 (tulip driver)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pozsar,

On Mon, Aug 21, 2006 at 11:03:51AM +0200, Pozsar Balazs wrote:
> 
> Does this seem better?
> 
> Signed-off-by: Pozsar Balazs <[email protected]>
> 
> Fix uli526x initialization
> 
> 
> --- a/drivers/net/tulip/uli526x.c	2006-08-21 10:57:43.000000000 +0200
> +++ a/drivers/net/tulip/uli526x.c	2006-08-21 11:01:37.000000000 +0200
> @@ -486,6 +486,7 @@
>  	u8	phy_tmp;
>  	u16	phy_value;
>  	u16 phy_reg_reset;
> +	int resetwait = 10;
>  
>  	ULI526X_DBUG(0, "uli526x_init()", 0);
>  
> @@ -515,7 +516,11 @@
>  	phy_reg_reset = phy_read(db->ioaddr, db->phy_addr, 0, db->chip_id);
>  	phy_reg_reset = (phy_reg_reset | 0x8000);
>  	phy_write(db->ioaddr, db->phy_addr, 0, phy_reg_reset, db->chip_id);
> -	udelay(500);
> +	while (resetwait-- > 0) {
> +		if (!(phy_read(db->ioaddr, db->phy_addr, 0, db->chip_id) & 0x8000))
> +			break;
> +		udelay(500);
> +	}
>  
>  	/* Process Phyxcer Media Mode */
>  	uli526x_set_phyxcer(db);

Thanks for writing up this patch.  udelay(500) seems a touch
heavyweight, however.  Would you mind experimenting a bit to see what
the delay typically ends up being?  Just add a KERN_DEBUG message
printing out resetwait and then fiddle with the udelay granularity.

-VAL
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux