public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Miles Lane <miles.lane@gmail.com>
Cc: Arjan van de Ven <arjan@infradead.org>,
	mingo@elte.hu, Andrew Morton <akpm@osdl.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.17-mm5 + pcmcia/hostap/8139too patches -- inconsistent {hardirq-on-W} -> {in-hardirq-W} usage
Date: Tue, 04 Jul 2006 10:26:41 +0100	[thread overview]
Message-ID: <1152005201.28597.14.camel@localhost.localdomain> (raw)
In-Reply-To: <a44ae5cd0607031614y2055828as6e0bbe2ce0d52ff1@mail.gmail.com>

Ar Llu, 2006-07-03 am 16:14 -0700, ysgrifennodd Miles Lane:
> eth2: NE2000 (DL10022 rev 30): io 0x300, irq 11, hw_addr 00:50:BA:73:92:3D
> Which seems to indicate I need to tweak the PCMCIA settings to get this card
> working.  I wonder if anyone is going to follow up on enabling shared IRQ
> support.


Try this. Note the SMP locking in this driver appears iffy and looks
like it was never SMP sane.

--- linux.vanilla-2.6.17/drivers/net/pcmcia/pcnet_cs.c	2006-06-19 17:29:46.000000000 +0100
+++ linux-2.6.17/drivers/net/pcmcia/pcnet_cs.c	2006-07-04 09:55:07.695012656 +0100
@@ -25,6 +25,8 @@
     Based also on Keith Moore's changes to Don Becker's code, for IBM
     CCAE support.  Drivers merged back together, and shared-memory
     Socket EA support added, by Ken Raeburn, September 1995.
+    
+    FIXME: Not SMP safe
 
 ======================================================================*/
 
@@ -254,7 +256,7 @@
     info->p_dev = link;
     link->priv = dev;
 
-    link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
+    link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
     link->irq.IRQInfo1 = IRQ_LEVEL_ID;
     link->conf.Attributes = CONF_ENABLE_IRQ;
     link->conf.IntType = INT_MEMORY_AND_IO;
@@ -998,7 +1000,8 @@
     link->open++;
 
     set_misc_reg(dev);
-    request_irq(dev->irq, ei_irq_wrapper, SA_SHIRQ, dev_info, dev);
+    if (request_irq(dev->irq, ei_irq_wrapper, SA_SHIRQ, dev_info, dev) < 0)
+        return -EBUSY;
 
     info->phy_id = info->eth_phy;
     info->link_status = 0x00;


  parent reply	other threads:[~2006-07-04  9:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-03 21:31 2.6.17-mm5 + pcmcia/hostap/8139too patches -- inconsistent {hardirq-on-W} -> {in-hardirq-W} usage Miles Lane
2006-07-03 21:43 ` Arjan van de Ven
2006-07-03 22:25   ` Alan Cox
2006-07-03 23:14     ` Miles Lane
2006-07-04  7:36       ` Ingo Molnar
2006-07-04  8:18       ` Alan Cox
2006-07-04  9:26       ` Alan Cox [this message]
2006-07-05  2:20         ` Miles Lane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1152005201.28597.14.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miles.lane@gmail.com \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox