NetBSD Problem Report #51661

From www@NetBSD.org  Sat Nov 26 23:24:17 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 9B8AA7A32B
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 26 Nov 2016 23:24:17 +0000 (UTC)
Message-Id: <20161126232416.9A19E7A340@mollari.NetBSD.org>
Date: Sat, 26 Nov 2016 23:24:16 +0000 (UTC)
From: venture37@geeklan.co.uk
Reply-To: venture37@geeklan.co.uk
To: gnats-bugs@NetBSD.org
Subject: wi(4) fails to attach when Orinocco PCMCIA adapter inserted
X-Send-Pr-Version: www-1.0

>Number:         51661
>Category:       kern
>Synopsis:       wi(4) fails to attach when Orinocco PCMCIA adapter inserted
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 26 23:25:00 +0000 2016
>Last-Modified:  Mon Nov 28 19:30:01 +0000 2016
>Originator:     Sevan Janiyan
>Release:        NetBSD-head
>Organization:
>Environment:
NetBSD 7.99.42 i386
>Description:
When a card is inserted, the kernel reports:
wi0 at pcmcia0 function 0: <Lucent Technologies, WaveLAN/IEEE, Version 01.01, >
wi0:wi0: wi_cmd: busy bit won't clear.
wi0: wi_cmd: busy bit won't clear.
wi0: wi_cmd: busy bit won't clear.
wi0: wi_cmd: busy bit won't clear.
wi0: wi_cmd: busy bit won't clear.
wi0: init failed
wi0: failed to attach controller

>How-To-Repeat:
Insert a Orinocco PCMCIA adapter to a system running NetBSD.
>Fix:

>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/51661: wi(4) fails to attach when Orinocco PCMCIA adapter
 inserted
Date: Mon, 28 Nov 2016 06:28:30 +0000

 On Sat, Nov 26, 2016 at 11:25:01PM +0000, venture37@geeklan.co.uk wrote:
  > When a card is inserted, the kernel reports:
  > wi0 at pcmcia0 function 0: <Lucent Technologies, WaveLAN/IEEE, Version 01.01, >
  > wi0:wi0: wi_cmd: busy bit won't clear.

 This message is preceded by

    /* wait for the busy bit to clear */
    for (i = 500; i > 0; i--) {	/* 5s */
 	if ((CSR_READ_2(sc, WI_COMMAND) & WI_CMD_BUSY) == 0)
 		break;
 	if (sc->sc_invalid)
 		return ENXIO;
 	DELAY(1000);	/* 1 m sec */
    }

 So that "5s" is a lie - it's really 0.5s. In case it's really supposed
 to be 5 seconds, try changing the 500 to 5000... can't really hurt...
 though it probably won't help either...

 -- 
 David A. Holland
 dholland@netbsd.org

From: Sevan Janiyan <venture37@geeklan.co.uk>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/51661: wi(4) fails to attach when Orinocco PCMCIA adapter
 inserted
Date: Mon, 28 Nov 2016 13:58:47 +0000

 Hi David,

 On 28/11/2016 06:30, David Holland wrote:
 >  So that "5s" is a lie - it's really 0.5s. In case it's really supposed
 >  to be 5 seconds, try changing the 500 to 5000... can't really hurt...
 >  though it probably won't help either...

 I bumped the value and built a new kernel for i386. Only difference with
 this change in place is that the system becomes unresponsive for ~ 20
 seconds before reporting the same messages as before.


 Sevan

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/51661: wi(4) fails to attach when Orinocco PCMCIA adapter
 inserted
Date: Mon, 28 Nov 2016 19:26:08 +0000

 On Mon, Nov 28, 2016 at 02:00:01PM +0000, Sevan Janiyan wrote:
  >  On 28/11/2016 06:30, David Holland wrote:
  >  >  So that "5s" is a lie - it's really 0.5s. In case it's really supposed
  >  >  to be 5 seconds, try changing the 500 to 5000... can't really hurt...
  >  >  though it probably won't help either...
  >  
  >  I bumped the value and built a new kernel for i386. Only difference with
  >  this change in place is that the system becomes unresponsive for ~ 20
  >  seconds before reporting the same messages as before.

 Yeah, I can't say I'm surprised.

 If this is happening on the same hw as 51660, Martin's concern there
 about addresses is probably also valid. I don't know how to interpret
 the information posted there, though. :-/

 I think the issue he's referring to is the same as the one described
 in PR 32938 (and probably also PR 27299) -- at one point I had my head
 in that stuff and had figured out what was going on, but it was years
 ago...


 -- 
 David A. Holland
 dholland@netbsd.org

NetBSD Home
NetBSD PR Database Search

(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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.