Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4fc09385 authored by Hirokazu Takata's avatar Hirokazu Takata Committed by Linus Torvalds
Browse files

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: default avatarHirokazu Takata <takata@linux-m32r.org>
Cc: Hitoshi Yamamoto <hitoshiy@linux-m32r.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b5445f95
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ static void mask_and_ack_mappi(unsigned int irq)

static void end_mappi_irq(unsigned int irq)
{
	if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
		enable_mappi_irq(irq);
}

@@ -88,7 +89,7 @@ void __init init_IRQ(void)
	irq_desc[M32R_IRQ_INT0].chip = &mappi_irq_type;
	irq_desc[M32R_IRQ_INT0].action = NULL;
	irq_desc[M32R_IRQ_INT0].depth = 1;
	icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
	icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11;
	disable_mappi_irq(M32R_IRQ_INT0);
#endif /* CONFIG_M32R_NE2000 */

+0 −9
Original line number Diff line number Diff line
@@ -219,15 +219,6 @@ static void ei_tx_timeout(struct net_device *dev)
	int txsr, isr, tickssofar = jiffies - dev->trans_start;
	unsigned long flags;

#if defined(CONFIG_M32R) && defined(CONFIG_SMP)
	unsigned long icucr;

	local_irq_save(flags);
	icucr = inl(M32R_ICU_CR1_PORTL);
	icucr |= M32R_ICUCR_ISMOD11;
	outl(icucr, M32R_ICU_CR1_PORTL);
	local_irq_restore(flags);
#endif
	ei_local->stat.tx_errors++;

	spin_lock_irqsave(&ei_local->page_lock, flags);