public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Claus-Justus Heine <ch@dot-heine.de>
To: linux-kernel@vger.kernel.org
Subject: Re: yenta-socket oops with 2.5.73-mm3, 2.5.74, 2.5.74-mm1
Date: Sun, 06 Jul 2003 18:56:54 +0200	[thread overview]
Message-ID: <3F0854D6.5040908@dot-heine.de> (raw)
In-Reply-To: <68xC.6U.1@gated-at.bofh.it>

[-- Attachment #1: Type: text/plain, Size: 693 bytes --]

Hi,

have the same problem, however ...


>  void pcmcia_parse_events(struct pcmcia_socket *s, u_int events)
>  {
> +       if (unlikely(&s->init_done == 0))

... this cannot work because of the "&". Of course, the _address_ of
s->init_done is always non-zero. Also, the problems are related to yenta_socket.c

The interrupt occurs during irq-probing in yenta-socket.c, so the problem should
be fixed _inside_ yenta-socket.c and not touch any other part of the pcmcia stuff.

I.e. add that "init_done" flag to "struct yenta_socket"; not to struct socket.
It should work then, just trying now ...

Greetings

Claus

P.s.:
I'm not subscribed to linux-kernel, please Cc: to my address. Thanks.



[-- Attachment #2: foo.diff --]
[-- Type: text/plain, Size: 1861 bytes --]

--- yenta_socket.c.old	2003-07-02 22:49:32.000000000 +0200
+++ yenta_socket.c	2003-07-06 16:13:55.000000000 +0200
@@ -426,7 +426,8 @@
 
 	events = yenta_events(socket);
 	if (events) {
-		pcmcia_parse_events(&socket->socket, events);
+		if (likely(socket->init_done))
+			pcmcia_parse_events(&socket->socket, events);
 		return IRQ_HANDLED;
 	}
 	return IRQ_NONE;
@@ -501,8 +502,8 @@
 	socket->socket.features |= SS_CAP_PAGE_REGS | SS_CAP_PCCARD | SS_CAP_CARDBUS;
 	socket->socket.map_size = 0x1000;
 	socket->socket.pci_irq = socket->cb_irq;
-	socket->socket.irq_mask = yenta_probe_irq(socket, isa_irq_mask);
 	socket->socket.cb_dev = socket->dev;
+	socket->socket.irq_mask = yenta_probe_irq(socket, isa_irq_mask);
 
 	printk("Yenta IRQ list %04x, PCI irq%d\n", socket->socket.irq_mask, socket->cb_irq);
 }
@@ -821,6 +822,7 @@
 {
 	struct yenta_socket *socket;
 	struct cardbus_override_struct *d;
+	int ret;
 	
 	socket = kmalloc(sizeof(struct yenta_socket), GFP_KERNEL);
 	if (!socket)
@@ -888,12 +890,18 @@
 		add_timer(&socket->poll_timer);
 	}
 
+	socket->init_done = 0; /* should still be 0, paranoya ... */
+
 	/* Figure out what the dang thing can do for the PCMCIA layer... */
 	yenta_get_socket_capabilities(socket, isa_interrupts);
 	printk("Socket status: %08x\n", cb_readl(socket, CB_SOCKET_STATE));
 
 	/* Register it with the pcmcia layer.. */
-	return pcmcia_register_socket(&socket->socket);
+	ret = pcmcia_register_socket(&socket->socket);
+	if (ret == 0) {
+		socket->init_done = 1;
+	}
+	return ret;
 }
 
 
--- yenta_socket.h.old	2003-07-02 22:45:05.000000000 +0200
+++ yenta_socket.h	2003-07-06 16:05:40.000000000 +0200
@@ -103,6 +103,8 @@
 
 	struct pcmcia_socket socket;
 
+	unsigned int init_done:1; /* used during initialization */
+
 	/* A few words of private data for special stuff of overrides... */
 	unsigned int private[8];
 };

       reply	other threads:[~2003-07-06 16:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6412.5pV.9@gated-at.bofh.it>
     [not found] ` <68xC.6U.1@gated-at.bofh.it>
2003-07-06 16:56   ` Claus-Justus Heine [this message]
2003-07-05 22:39 yenta-socket oops with 2.5.73-mm3, 2.5.74, 2.5.74-mm1 Daniel Ritz
2003-07-06  3:26 ` Michael Frank
2003-07-06  7:45   ` Russell King
2003-07-06 13:14     ` Michael Frank
2003-07-06 22:15 ` Russell King
2003-07-07  2:02   ` Michael Frank
  -- strict thread matches above, loose matches on Subject: below --
2003-07-04  1:10 Michael Frank
2003-07-05 10:05 ` Michael Frank

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=3F0854D6.5040908@dot-heine.de \
    --to=ch@dot-heine.de \
    --cc=linux-kernel@vger.kernel.org \
    /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