NetBSD Problem Report #51585

From www@NetBSD.org  Sat Oct 29 20:23:03 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 152B47A26F
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 29 Oct 2016 20:23:03 +0000 (UTC)
Message-Id: <20161029202302.28E0F7A2A6@mollari.NetBSD.org>
Date: Sat, 29 Oct 2016 20:23:02 +0000 (UTC)
From: venture37@geeklan.co.uk
Reply-To: venture37@geeklan.co.uk
To: gnats-bugs@NetBSD.org
Subject: detaching cardbus adapter causing panic
X-Send-Pr-Version: www-1.0

>Number:         51585
>Category:       kern
>Synopsis:       detaching cardbus adapter causing panic
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 29 20:25:00 +0000 2016
>Last-Modified:  Mon Oct 31 05:20:01 +0000 2016
>Originator:     Sevan Janiyan
>Release:        NetBSD-head
>Organization:
>Environment:
>Description:
Card is a PSION DACOM multi-function adapter.
modem/ethernet

Kernel reports:
Psion, 10-100Mb MF CardBus, 400062-01C, 123456789abc (manufacturer 0x16c, product 0x21) Standard Microsystems 83C175 ("EPIC/100") Fast Ethernet (ethernet network, revision 0x01) at cardbus0 function 0 not configured
com3 at cardbus0 function 1: there are more than one possible base
com3: address for this device, please report the following information
com3: vendor 0x10b8 product 0x6
com3: base address 10 type i/o size 8
com3: base address 14 type mem size c

Removing the card causes the system to panic:
uvm_fault(0xc0ff0d40, 0, 2) -> 0xe
fatal page fault in supervisor mode
trap type 6 code 2 eip c097d39e cs 8 eflags 10296 cr2 19c ilevel 8 esp c1026d10
curlwp 0xc3c71d40 pid 0 lid 32 lowest kstack 0xdb6df2c0
kernel: supervisor trap page fault, code=0
stopped in pid 0.32 (system) at netbsd:tty_free+0x2b: movl $0,19c(%eax)
>How-To-Repeat:
Attach card to system then eject.
>Fix:

>Audit-Trail:
From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/51585: detaching cardbus adapter causing panic
Date: Sun, 30 Oct 2016 06:28:39 +0000 (UTC)

 venture37@geeklan.co.uk writes:

 >Psion, 10-100Mb MF CardBus, 400062-01C, 123456789abc (manufacturer 0x16c, product 0x21) Standard Microsystems 83C175 ("EPIC/100") Fast Ethernet (ethernet network, revision 0x01) at cardbus0 function 0 not configured

 >Removing the card causes the system to panic:
 >uvm_fault(0xc0ff0d40, 0, 2) -> 0xe
 >fatal page fault in supervisor mode
 >trap type 6 code 2 eip c097d39e cs 8 eflags 10296 cr2 19c ilevel 8 esp c1026d10
 >curlwp 0xc3c71d40 pid 0 lid 32 lowest kstack 0xdb6df2c0
 >kernel: supervisor trap page fault, code=0
 >stopped in pid 0.32 (system) at netbsd:tty_free+0x2b: movl $0,19c(%eax)

 The card matches but doesn't attach. The detach function however
 tries to perform all operations as if the attachment did succeed.

 The driver needs to keep an 'attachment state' and detach accordingly.

 -- 
 -- 
                                 Michael van Elst
 Internet: mlelstv@serpens.de
                                 "A potential Snark may lurk in every tree."

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/51585: detaching cardbus adapter causing panic
Date: Mon, 31 Oct 2016 05:19:21 +0000

 On Sun, Oct 30, 2016 at 06:30:01AM +0000, Michael van Elst wrote:
  >  The card matches but doesn't attach. The detach function however
  >  tries to perform all operations as if the attachment did succeed.
  >  
  >  The driver needs to keep an 'attachment state' and detach accordingly.

 Or maybe we should fix this once and for all for failing attachments :-)

 -- 
 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.