Re: [PATCH] Lower e100 latency

From: J.A. Magallon
Date: Mon Mar 27 2006 - 15:27:25 EST


Corrected:

--- 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,10 +884,10 @@
* 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",
@@ -897,10 +897,10 @@
}
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.16-jam1 (gcc 4.0.3 (4.0.3-1mdk for Mandriva Linux release 2006.1))

Attachment: signature.asc
Description: PGP signature