aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHirokazu Takata <takata@linux-m32r.org>2007-07-26 13:41:19 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-26 14:35:20 -0400
commit4fc09385c79fa95e97365d33de9b4e046d680b94 (patch)
tree961d42af4fd22ae01cfef355c39fc98276958862
parentb5445f956ec3c8c19b760775e9ff92a160e3a167 (diff)
m32r: Fix ei_tx_timeout() in drivers/net/lib8390.c
Change INT0 trigger mode from edge-sense mode to level-sense mode, in order to fix the following timeout error: 'NETDEV WATCHDOG: eth0: transmit timed out'. This patch is required only for the Mappi platform. Signed-off-by: Hirokazu Takata <takata@linux-m32r.org> Cc: Hitoshi Yamamoto <hitoshiy@linux-m32r.org> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/m32r/kernel/setup_mappi.c5
-rw-r--r--drivers/net/lib8390.c9
2 files changed, 3 insertions, 11 deletions
diff --git a/arch/m32r/kernel/setup_mappi.c b/arch/m32r/kernel/setup_mappi.c
index 6b2d77da0683..fe73c9ec611f 100644
--- a/arch/m32r/kernel/setup_mappi.c
+++ b/arch/m32r/kernel/setup_mappi.c
@@ -45,7 +45,8 @@ static void mask_and_ack_mappi(unsigned int irq)
45 45
46static void end_mappi_irq(unsigned int irq) 46static void end_mappi_irq(unsigned int irq)
47{ 47{
48 enable_mappi_irq(irq); 48 if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
49 enable_mappi_irq(irq);
49} 50}
50 51
51static unsigned int startup_mappi_irq(unsigned int irq) 52static unsigned int startup_mappi_irq(unsigned int irq)
@@ -88,7 +89,7 @@ void __init init_IRQ(void)
88 irq_desc[M32R_IRQ_INT0].chip = &mappi_irq_type; 89 irq_desc[M32R_IRQ_INT0].chip = &mappi_irq_type;
89 irq_desc[M32R_IRQ_INT0].action = NULL; 90 irq_desc[M32R_IRQ_INT0].action = NULL;
90 irq_desc[M32R_IRQ_INT0].depth = 1; 91 irq_desc[M32R_IRQ_INT0].depth = 1;
91 icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 92 icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11;
92 disable_mappi_irq(M32R_IRQ_INT0); 93 disable_mappi_irq(M32R_IRQ_INT0);
93#endif /* CONFIG_M32R_NE2000 */ 94#endif /* CONFIG_M32R_NE2000 */
94 95
diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c
index 5c86e737f954..721ee38d2241 100644
--- a/drivers/net/lib8390.c
+++ b/drivers/net/lib8390.c
@@ -219,15 +219,6 @@ static void ei_tx_timeout(struct net_device *dev)
219 int txsr, isr, tickssofar = jiffies - dev->trans_start; 219 int txsr, isr, tickssofar = jiffies - dev->trans_start;
220 unsigned long flags; 220 unsigned long flags;
221 221
222#if defined(CONFIG_M32R) && defined(CONFIG_SMP)
223 unsigned long icucr;
224
225 local_irq_save(flags);
226 icucr = inl(M32R_ICU_CR1_PORTL);
227 icucr |= M32R_ICUCR_ISMOD11;
228 outl(icucr, M32R_ICU_CR1_PORTL);
229 local_irq_restore(flags);
230#endif
231 ei_local->stat.tx_errors++; 222 ei_local->stat.tx_errors++;
232 223
233 spin_lock_irqsave(&ei_local->page_lock, flags); 224 spin_lock_irqsave(&ei_local->page_lock, flags);