aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tulip')
-rw-r--r--drivers/net/tulip/de2104x.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
index 567c62757e9d..1b5edd646a8c 100644
--- a/drivers/net/tulip/de2104x.c
+++ b/drivers/net/tulip/de2104x.c
@@ -842,7 +842,7 @@ static inline int de_is_running (struct de_private *de)
842static void de_stop_rxtx (struct de_private *de) 842static void de_stop_rxtx (struct de_private *de)
843{ 843{
844 u32 macmode; 844 u32 macmode;
845 unsigned int work = 1000; 845 unsigned int i = 1300/100;
846 846
847 macmode = dr32(MacMode); 847 macmode = dr32(MacMode);
848 if (macmode & RxTx) { 848 if (macmode & RxTx) {
@@ -850,10 +850,14 @@ static void de_stop_rxtx (struct de_private *de)
850 dr32(MacMode); 850 dr32(MacMode);
851 } 851 }
852 852
853 while (--work > 0) { 853 /* wait until in-flight frame completes.
854 * Max time @ 10BT: 1500*8b/10Mbps == 1200us (+ 100us margin)
855 * Typically expect this loop to end in < 50 us on 100BT.
856 */
857 while (--i) {
854 if (!de_is_running(de)) 858 if (!de_is_running(de))
855 return; 859 return;
856 cpu_relax(); 860 udelay(100);
857 } 861 }
858 862
859 printk(KERN_WARNING "%s: timeout expired stopping DMA\n", de->dev->name); 863 printk(KERN_WARNING "%s: timeout expired stopping DMA\n", de->dev->name);