netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Restore the original TX FIFO overflow process.
@ 2006-09-22 19:30 Jesse Huang
  2006-09-23  4:54 ` Andrew Morton
  2006-09-23  8:50 ` Andrew Morton
  0 siblings, 2 replies; 4+ messages in thread
From: Jesse Huang @ 2006-09-22 19:30 UTC (permalink / raw)
  To: linux-kernel, netdev, akpm, jgarzik, jesse

From: Jesse Huang <jesse@icplus.com.tw>

Change Logs:
   - Restore the original TX FIFO overflow process.

Signed-off-by: Jesse Huang <jesse@icplus.com.tw>

---

 drivers/net/sundance.c |   45 +++++++++++++++++++++++++++------------------
 1 files changed, 27 insertions(+), 18 deletions(-)

7d8d60d6b1dbdbc36896148df1cc0242c037d838
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index a253924..e68d325 100755
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -21,8 +21,8 @@
 */
 
 #define DRV_NAME	"sundance"
-#define DRV_VERSION	"1.01+LK1.14"
-#define DRV_RELDATE	"04-Aug-2006"
+#define DRV_VERSION	"1.01+LK1.15"
+#define DRV_RELDATE	"22-Sep-2006"
 
 
 /* The user-configurable values.
@@ -1167,24 +1167,33 @@ static irqreturn_t intr_handler(int irq,
 					if (tx_status & 0x02)
 						np->stats.tx_window_errors++;
 
-					/* FIFO ERROR need to be reset tx */
-					if (tx_status & 0x10) {	/* Reset the Tx. */
-						spin_lock(&np->lock);
-						reset_tx(dev);
-						spin_unlock(&np->lock);
-					}
-					if (tx_status & 0x1e) {
-					/* need to make sure tx enabled */
-						int i = 10;
-						do {
-							iowrite16(ioread16(ioaddr + MACCtrl1) | TxEnable, ioaddr + MACCtrl1);
-							if (ioread16(ioaddr + MACCtrl1) & TxEnabled)
-								break;
-							mdelay(1);
-						} while (--i);
+					/*
+					** This reset has been verified on
+					** DFE-580TX boards ! phdm@macqel.be.
+					*/
+					if (tx_status & 0x10) {	/* TxUnderrun */
+						unsigned short txthreshold;
+
+						txthreshold = ioread16 (ioaddr + TxStartThresh);
+						/* Restart Tx FIFO and transmitter */
+						sundance_reset(dev, (NetworkReset|FIFOReset|TxReset) << 16);
+						iowrite16 (txthreshold, ioaddr + TxStartThresh);
+						/* No need to reset the Tx pointer here */
 					}
+					/* Restart the Tx. */
+					iowrite16 (TxEnable, ioaddr + MACCtrl1);
 				}
-
+				if (tx_status & 0x1e) {
+				/* need to make sure tx enabled */
+					int i = 10;
+					do {
+						iowrite16(ioread16(ioaddr + MACCtrl1) | TxEnable, ioaddr + MACCtrl1);
+						if (ioread16(ioaddr + MACCtrl1) & TxEnabled)
+							break;
+						mdelay(1);
+					} while (--i);
+				}
+				
 				iowrite16 (0, ioaddr + TxStatus);
 				tx_status = ioread16 (ioaddr + TxStatus);
 				if (tx_cnt < 0)
-- 
1.3.GIT




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

* Re: [PATCH] Restore the original TX FIFO overflow process.
  2006-09-22 19:30 [PATCH] Restore the original TX FIFO overflow process Jesse Huang
@ 2006-09-23  4:54 ` Andrew Morton
  2006-09-23  8:50 ` Andrew Morton
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2006-09-23  4:54 UTC (permalink / raw)
  To: Jesse Huang; +Cc: linux-kernel, netdev, jgarzik

On Fri, 22 Sep 2006 15:30:01 -0400
Jesse Huang <jesse@icplus.com.tw> wrote:

>  #define DRV_NAME	"sundance"
> -#define DRV_VERSION	"1.01+LK1.14"
> -#define DRV_RELDATE	"04-Aug-2006"
> +#define DRV_VERSION	"1.01+LK1.15"
> +#define DRV_RELDATE	"22-Sep-2006"

Can we please delete this thing?  It's *forever* getting rejects and 
people only remember to update it a fraction of the time anyway.

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

* Re: [PATCH] Restore the original TX FIFO overflow process.
  2006-09-22 19:30 [PATCH] Restore the original TX FIFO overflow process Jesse Huang
  2006-09-23  4:54 ` Andrew Morton
@ 2006-09-23  8:50 ` Andrew Morton
       [not found]   ` <20060923015157.b4014c6a.akpm@osdl.org>
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2006-09-23  8:50 UTC (permalink / raw)
  To: Jesse Huang; +Cc: linux-kernel, netdev, jgarzik

On Fri, 22 Sep 2006 15:30:01 -0400
Jesse Huang <jesse@icplus.com.tw> wrote:

> From: Jesse Huang <jesse@icplus.com.tw>
> 
> Change Logs:
>    - Restore the original TX FIFO overflow process.
> 
> Signed-off-by: Jesse Huang <jesse@icplus.com.tw>
> 
> ...
>
> +						txthreshold = ioread16 (ioaddr + TxStartThresh);

Your patch ip100a-fix-tx-pause-bug-reset_tx-intr_handler.patch removed
TxStartThresh, so it won't compile.

I don't have a clue what's happening with this driver - I'll drop everything.

I suggest you send a complete new patch series against Jeff's latest tree. 
I'll send you a copy of that.



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

* Re: [PATCH] Restore the original TX FIFO overflow process.
       [not found]   ` <20060923015157.b4014c6a.akpm@osdl.org>
@ 2006-09-25  1:20     ` Jesse Huang
  0 siblings, 0 replies; 4+ messages in thread
From: Jesse Huang @ 2006-09-25  1:20 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, netdev, jgarzik

Ok, I will generate new patch according to this.

Thanks.
----- Original Message ----- 
From: "Andrew Morton" <akpm@osdl.org>
To: "Jesse Huang" <jesse@icplus.com.tw>
Sent: Saturday, September 23, 2006 4:51 PM
Subject: Re: [PATCH] Restore the original TX FIFO overflow process.


On Sat, 23 Sep 2006 01:50:41 -0700
Andrew Morton <akpm@osdl.org> wrote:

> I suggest you send a complete new patch series against Jeff's latest tree.
> I'll send you a copy of that.

attached.




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

end of thread, other threads:[~2006-09-25  1:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-22 19:30 [PATCH] Restore the original TX FIFO overflow process Jesse Huang
2006-09-23  4:54 ` Andrew Morton
2006-09-23  8:50 ` Andrew Morton
     [not found]   ` <20060923015157.b4014c6a.akpm@osdl.org>
2006-09-25  1:20     ` Jesse Huang

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).