public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.9-rc2-mm4 e100 enable_irq unbalanced from
@ 2004-09-27 19:24 Paul Fulghum
  2004-09-27 21:12 ` Paul Fulghum
  2004-09-27 23:00 ` J.A. Magallon
  0 siblings, 2 replies; 10+ messages in thread
From: Paul Fulghum @ 2004-09-27 19:24 UTC (permalink / raw)
  To: scott.feldman; +Cc: linux-kernel

The e100 module is generating a warning:

Sep 27 13:30:29 deimos kernel: e100: Intel(R) PRO/100 Network Driver, 3.1.4-NAPI
Sep 27 13:30:29 deimos kernel: e100: Copyright(c) 1999-2004 Intel Corporation
Sep 27 13:30:29 deimos kernel: e100: eth0: e100_probe: addr 0xfecfc000, irq 16, MAC addr 00:90:27:3A:C5:E3
Sep 27 13:30:29 deimos kernel: enable_irq(16) unbalanced from ec83ff33
Sep 27 13:30:29 deimos kernel:  [<c010923f>] enable_irq+0xcf/0xe0
Sep 27 13:30:29 deimos kernel:  [<ec83ff33>] e100_up+0xf3/0x1f0 [e100]
Sep 27 13:30:29 deimos kernel:  [<ec83ff33>] e100_up+0xf3/0x1f0 [e100]
Sep 27 13:30:29 deimos kernel:  [<ec83f410>] e100_intr+0x0/0x140 [e100]
Sep 27 13:30:29 deimos kernel:  [<ec841131>] e100_open+0x31/0x80 [e100]
Sep 27 13:30:29 deimos kernel:  [<c0318d4c>] dev_open+0x8c/0xa0
Sep 27 13:30:29 deimos kernel:  [<c031cc74>] dev_mc_upload+0x24/0x40
Sep 27 13:30:29 deimos kernel:  [<c031a4ea>] dev_change_flags+0x12a/0x150
Sep 27 13:30:29 deimos kernel:  [<c0318c0d>] dev_load+0x2d/0x80
Sep 27 13:30:29 deimos kernel:  [<c0355b37>] devinet_ioctl+0x277/0x730

e100_up calls disable_irq, request_irq, then enable_irq
as shown below.

static int e100_up(struct nic *nic)
{
	...
	disable_irq(nic->pdev->irq);
	...
	if((err = request_irq(nic->pdev->irq, e100_intr, SA_SHIRQ,
		nic->netdev->name, nic->netdev)))
		goto err_no_irq;
	e100_enable_irq(nic);
	enable_irq(nic->pdev->irq);
	netif_wake_queue(nic->netdev);
	return 0;
	...
}

On this machine, the e100 is the only device on that IRQ.

request_irq calls setup_irq which clears the irq descriptor
depth member to 0 and enables the interrupt because this
is the first device to use that interrupt. 
This results in the warning on the next enable_irq().

I'm not sure why the driver is calling disable_irq
IRQ before calling request_irq. You can't get that
interrupt until you call request_irq, and once you
call request_irq you can (at least when this is
the first device on that IRQ) even before the
call to enable_irq.

I suspect the correct thing is to remove
disable_irq/enable_irq from e100_up.
I don't see any purpose for these calls in e100_up.

-- 
Paul Fulghum
paulkf@microgate.com


^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: 2.6.9-rc2-mm4 e100 enable_irq unbalanced from
@ 2004-09-28 21:03 Feldman, Scott
  2004-09-29  3:06 ` Paul Fulghum
  0 siblings, 1 reply; 10+ messages in thread
From: Feldman, Scott @ 2004-09-28 21:03 UTC (permalink / raw)
  To: Paul Fulghum, Venkatesan, Ganesh; +Cc: linux-kernel


> I suspect the correct thing is to remove
> disable_irq/enable_irq from e100_up.
> I don't see any purpose for these calls in e100_up.

I don't either!  This doesn't look right to me at all.  

These enable_irq/disable_irq calls got added recently to -mm, probably
in the fix-for-spurious-interrupts-on-e100-resume-2.patch.  Maybe just
the disable_irq call is all that is needed to solve the spurious
interrupt case?

Ganesh, can we back out patch out of -mm and go back to the drawing
board on the original problem?  This patch will cause problems.

-scott

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

end of thread, other threads:[~2004-09-30 18:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-27 19:24 2.6.9-rc2-mm4 e100 enable_irq unbalanced from Paul Fulghum
2004-09-27 21:12 ` Paul Fulghum
2004-09-30 18:21   ` Jeremy Fitzhardinge
2004-09-27 23:00 ` J.A. Magallon
2004-09-27 23:09   ` Paul Fulghum
2004-09-28 22:13     ` J.A. Magallon
  -- strict thread matches above, loose matches on Subject: below --
2004-09-28 21:03 Feldman, Scott
2004-09-29  3:06 ` Paul Fulghum
2004-09-29 12:13   ` Alan Cox
2004-09-29 13:31     ` Russell King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox