NetBSD Problem Report #41174

From www@NetBSD.org  Thu Apr  9 03:40:48 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 4637663C169
	for <gnats-bugs@gnats.netbsd.org>; Thu,  9 Apr 2009 03:40:48 +0000 (UTC)
Message-Id: <20090409034047.F0B9663C166@www.NetBSD.org>
Date: Thu,  9 Apr 2009 03:40:47 +0000 (UTC)
From: evaldo@gardenali.biz
Reply-To: evaldo@gardenali.biz
To: gnats-bugs@NetBSD.org
Subject: uhmodem(4) hotplug chashes on amd64
X-Send-Pr-Version: www-1.0

>Number:         41174
>Category:       kern
>Synopsis:       uhmodem(4) hotplug chashes on amd64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 09 03:45:00 +0000 2009
>Closed-Date:    Mon Dec 23 23:05:26 +0000 2013
>Last-Modified:  Mon Dec 23 23:05:26 +0000 2013
>Originator:     Evaldo Gardenali
>Release:        5.99.10 checked out 20090408 evening UTC
>Organization:
>Environment:
>Description:
Crash occurs when plugging a Huawei e156 modem after the system has booted. Huawei e156 presents two virtual serial ports (first for connection, second for management/status), one virtual CD drive with windows drivers, one microSD slot.

http://evaldo.gardenali.biz/NetBSD-5.99.10-amd64/DSCN1722.JPG
http://evaldo.gardenali.biz/NetBSD-5.99.10-amd64/DSCN1724.JPG

Problem does not happen when plugging the modem with machine powered off and then booting into NetBSD. PPP Session is established, bandwidth and latency are reasonable, connection is stable (did a whole cvs-over-ssh fetch for src/)

Therefore, this PR validates port-amd64/40991, it should be implemented for better port-amd64 experience.

Problem does not happen on 5.99.10 ***i386**** 200904070000Z, using same laptop, same usb port.

>How-To-Repeat:
Compile a GENERIC kernel, adding only the following lines: (copied from PR# port-amd64/40991)

# Huawei E220 3G/HSDPA modem
uhmodem* at uhub? port ? configuration ? interface ?
ucom*	at uhmodem? portno ?

Boot system with usb modem unplugged
Plug it (both with a microSD card or without a microSD card produce the same results)
Wait until NetBSD detaches the device and reattaches it
CRASH!


>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: port-amd64-maintainer->kern-bug-people
Responsible-Changed-By: tnn@NetBSD.org
Responsible-Changed-When: Wed, 22 Apr 2009 07:21:49 +0000
Responsible-Changed-Why:
I can reproduce the problem on i386.
I have some crude workaround patches that insert sleeps in
various places; it looks like timing matters (locking problem?).
Will attach patches to PR in case they help anyone debug it.


From: Evaldo Gardenali <evaldo@gardenali.biz>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/41174 (uhmodem(4) hotplug chashes on amd64)
Date: Wed, 29 Apr 2009 23:01:59 +0000

 As of 5.99.11, situation reversed:

 - turning laptop on with uhmodem attached: CRASH
 - turning laptop on without uhmodem, attaching it before loading kernel: 
 CRASH
 - turning laptop on without uhmodem, attaching it after the end of the 
 boot process: WORKS!
 - removing the WORKING uhmodem and Reinserting the first time in the 
 SAME usb port: WORKS
 - removing the WORKING uhmodem and Reinserting the first time in ANOTHER 
 usb port: CRASH
 - removing the WORKING uhmodem and Reinserting the SECOND time in the 
 SAME usb port: CRASH

 tried that too many times... seems consistent.

 Evaldo

From: Tobias Nygren <tnn@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41174 CVS commit: src/sys/arch
Date: Thu, 7 Jan 2010 18:49:31 +0000

 Module Name:	src
 Committed By:	tnn
 Date:		Thu Jan  7 18:49:30 UTC 2010

 Modified Files:
 	src/sys/arch/amd64/conf: GENERIC
 	src/sys/arch/i386/conf: ALL GENERIC XBOX XEN3_DOM0

 Log Message:
 uhmodem(4) is superseded by u3g(4) and u3ginit(4).
 Prepare for uhmodem(4) removal by not building it anymore.
 This may fix PR kern/41174.


 To generate a diff of this commit:
 cvs rdiff -u -r1.261 -r1.262 src/sys/arch/amd64/conf/GENERIC
 cvs rdiff -u -r1.226 -r1.227 src/sys/arch/i386/conf/ALL
 cvs rdiff -u -r1.958 -r1.959 src/sys/arch/i386/conf/GENERIC
 cvs rdiff -u -r1.19 -r1.20 src/sys/arch/i386/conf/XBOX
 cvs rdiff -u -r1.26 -r1.27 src/sys/arch/i386/conf/XEN3_DOM0

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 13 May 2010 18:34:10 +0000
State-Changed-Why:
How does u3g(4) work for you?


State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 23 Dec 2013 23:05:26 +0000
State-Changed-Why:
3.5-year feedback timeout, and uhmodem(4) was removed.


>Unformatted:

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