NetBSD Problem Report #37227
From peter@jupiter.pointless.nl Fri Oct 26 20:18:52 2007
Return-Path: <peter@jupiter.pointless.nl>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 464AB63B935
for <gnats-bugs@gnats.NetBSD.org>; Fri, 26 Oct 2007 20:18:52 +0000 (UTC)
Message-Id: <20071026170704.7E8423B1F9@jupiter.pointless.nl>
Date: Fri, 26 Oct 2007 19:07:04 +0200 (CEST)
From: Peter Postma <peter@pointless.nl>
Reply-To: peter@pointless.nl
To: gnats-bugs@NetBSD.org
Subject: cf card no longer detected after vmlocking merge
X-Send-Pr-Version: 3.95
>Number: 37227
>Category: port-hpcarm
>Synopsis: cf card no longer detected after vmlocking merge
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: rafal
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Oct 26 20:20:00 +0000 2007
>Closed-Date: Sun Apr 20 16:52:13 +0000 2008
>Last-Modified: Sun Apr 20 16:52:13 +0000 2008
>Originator: Peter Postma
>Release: NetBSD 4.99.14
>Organization:
>Environment:
System: NetBSD jupiter.pointless.nl 4.99.14 NetBSD 4.99.14 (GENERIC) #6: Sun Oct 7 16:15:10 CEST 2007 peter@jupiter.pointless.nl:/usr/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
After the first merge of vmlocking changes [1], the CF card in
the jornada 720 is no longer detected.
The dmesg used to be:
sacpcic0 at sacc0
pcmcia0 at sacpcic0
pcmcia1 at sacpcic0
[other messages]
sacpcic0: card present
sacpcic_socket_enable: wait ready 1
wdc0 at pcmcia1 function 0: <SanDisk, SDP, 5/3 0.6
It's now:
sacpcic0 at sacc0
pcmcia0 at sacpcic0
pcmcia1 at sacpcic0
sacpcic0: card present
sacpcic_socket_enable: wait ready 100
pcmcia1: card appears to have bogus CIS
It appears that the card gets attached earlier in the boot process but
for some reason fails to attach.
Last working kernel: 2007-07-09 20:00 GMT
First non-working kernel: 2007-07-10 00:00 GMT
[1] http://mail-index.netbsd.org/source-changes/2007/07/09/0022.html
http://mail-index.netbsd.org/source-changes/2007/07/09/0023.html
http://mail-index.netbsd.org/source-changes/2007/07/09/0024.html
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: Peter Postma <peter@pointless.nl>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-hpcarm/37227
Date: Tue, 6 Nov 2007 14:41:36 +0100
--WIyZ46R2i8wDzkSu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
This patch seems to fix it.
--
Peter Postma
--WIyZ46R2i8wDzkSu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="sa11x1_pcic.diff"
Index: sa11x1_pcic.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/sa11x0/sa11x1_pcic.c,v
retrieving revision 1.16
diff -u -r1.16 sa11x1_pcic.c
--- sa11x1_pcic.c 17 Oct 2007 19:53:43 -0000 1.16
+++ sa11x1_pcic.c 6 Nov 2007 13:35:39 -0000
@@ -65,9 +65,25 @@
static int sacpcic_print(void *, const char *);
+static void
+sapcic_deferred(struct device *dev)
+{
+ struct sacpcic_softc *sc = (struct sacpcic_softc *)dev;
+ struct sacc_softc *psc = sc->sc_socket[0].pcictag_cookie;
+ int i;
+
+ for (i = 0; i < 2; i++) {
+ sapcic_kthread_create(&sc->sc_socket[i]);
+
+ sacc_intr_establish((sacc_chipset_tag_t)psc,
+ i ? IRQ_S1_CDVALID : IRQ_S0_CDVALID, IST_EDGE_RAISE,
+ IPL_BIO, sapcic_intr, &sc->sc_socket[i]);
+ }
+}
+
void
sacpcic_attach_common(struct sacc_softc *psc, struct sacpcic_softc *sc,
- void *aux, void (* socket_setup_hook)(struct sapcic_socket *))
+ void *aux, void (*socket_setup_hook)(struct sapcic_socket *))
{
int i;
struct pcmciabus_attach_args paa;
@@ -98,19 +114,9 @@
sc->sc_socket[i].pcmcia =
config_found_ia(&sc->sc_pc.sc_dev, "pcmciabus", &paa,
sacpcic_print);
-
- sacc_intr_establish((sacc_chipset_tag_t)psc,
- i ? IRQ_S1_CDVALID : IRQ_S0_CDVALID,
- IST_EDGE_RAISE, IPL_BIO, sapcic_intr,
- &sc->sc_socket[i]);
-
- /* create kthread */
- sapcic_kthread_create(&sc->sc_socket[i]);
-#if 0 /* XXX */
- /* establish_intr should be after creating the kthread */
- config_interrupt(&sc->sc_socket[i], sapcic_config_intr);
-#endif
}
+
+ config_interrupts((struct device *)sc, sapcic_deferred);
}
int
--WIyZ46R2i8wDzkSu--
Responsible-Changed-From-To: port-hpcarm-maintainer->rafal
Responsible-Changed-By: rafal@NetBSD.org
Responsible-Changed-When: Tue, 15 Apr 2008 04:02:08 +0000
Responsible-Changed-Why:
take
From: Rafal Boni <rafal@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/37227 CVS commit: src/sys/arch/arm/sa11x0
Date: Sun, 20 Apr 2008 16:47:52 +0000 (UTC)
Module Name: src
Committed By: rafal
Date: Sun Apr 20 16:47:52 UTC 2008
Modified Files:
src/sys/arch/arm/sa11x0: sa11x1_pcic.c
Log Message:
Fix detection / attachment of CF / PCMCIA cards present at boot-time. This
was broken by one of the early vmlocking merges, which removed the kthread
that did the initial detection / attachment and instead called the code
directly from the PCMCIA controller attach method.
Submitted in PR port-hpcarm/37227 by Peter Postma; I've tweaked it ever-so-
slightly.
To generate a diff of this commit:
cvs rdiff -r1.16 -r1.17 src/sys/arch/arm/sa11x0/sa11x1_pcic.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: rafal@NetBSD.org
State-Changed-When: Sun, 20 Apr 2008 16:52:13 +0000
State-Changed-Why:
Fixed; thanks for the patch!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.