[PATCH] Lower e100 latency

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

 



On Thu, 23 Mar 2006 22:07:11 +0100, "J.A. Magallon" <[email protected]> wrote:

> On Thu, 23 Mar 2006 01:40:46 -0800, Andrew Morton <[email protected]> wrote:
> 
> > 
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16/2.6.16-mm1/
> > 
> 

--- linux/drivers/net/e100.c.orig	2006-01-24 09:20:44.000000000 +0100
+++ linux/drivers/net/e100.c	2006-01-24 09:21:55.000000000 +0100
@@ -884,23 +884,23 @@
 	 * procedure it should be done under lock.
 	 */
 	spin_lock_irqsave(&nic->mdio_lock, flags);
-	for (i = 100; i; --i) {
+	for (i = 1000; i; --i) {
 		if (readl(&nic->csr->mdi_ctrl) & mdi_ready)
 			break;
-		udelay(20);
+		udelay(2);
 	}
 	if (unlikely(!i)) {
-		printk("e100.mdio_ctrl(%s) won't go Ready\n",
+		DPRINTK(PROBE, ERR, "e100.mdio_ctrl(%s) won't go Ready\n",
 			nic->netdev->name );
 		spin_unlock_irqrestore(&nic->mdio_lock, flags);
 		return 0;		/* No way to indicate timeout error */
 	}
 	writel((reg << 16) | (addr << 21) | dir | data, &nic->csr->mdi_ctrl);
 
-	for (i = 0; i < 100; i++) {
-		udelay(20);
+	for (i = 0; i < 1000; i++) {
 		if ((data_out = readl(&nic->csr->mdi_ctrl)) & mdi_ready)
 			break;
+		udelay(2);
 	}
 	spin_unlock_irqrestore(&nic->mdio_lock, flags);
 	DPRINTK(HW, DEBUG,


--
J.A. Magallon <jamagallon()able!es>     \               Software is like sex:
werewolf!able!es                         \         It's better when it's free
Mandriva Linux release 2006.1 (Cooker) for i586
Linux 2.6.15-jam20 (gcc 4.0.3 (4.0.3-1mdk for Mandriva Linux release 2006.1))

Attachment: signature.asc
Description: PGP signature


[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