NetBSD Problem Report #37459

From jmcneill@black.invisible.ca  Sun Dec  2 01:37:54 2007
Return-Path: <jmcneill@black.invisible.ca>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 7D6B963B935
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  2 Dec 2007 01:37:54 +0000 (UTC)
Message-Id: <20071202013753.DFA9A7D8964@black.invisible.ca>
Date: Sat,  1 Dec 2007 20:37:53 -0500 (EST)
From: jmcneill@invisible.ca
Reply-To: jmcneill@invisible.ca
To: gnats-bugs@NetBSD.org
Subject: USB device issues on suspend/resume
X-Send-Pr-Version: 3.95

>Number:         37459
>Category:       kern
>Synopsis:       USB device issues on suspend/resume
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          suspended
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 02 01:40:00 +0000 2007
>Closed-Date:    
>Last-Modified:  Mon Sep 22 00:35:44 +0000 2008
>Originator:     Jared D. McNeill
>Release:        NetBSD 4.99.38
>Organization:
NetBSD

>Environment:


System: NetBSD black.invisible.ca 4.99.38 NetBSD 4.99.38 (GENERIC) #67: Sat Dec 1 13:18:42 EST 2007 jmcneill@black.invisible.ca:/export/home/jmcneill/branches/jmcneill-pm/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
	On some machines, USB devices disappear and reappear on a suspend and
	resume cycle.

	Device attachment status should be tracked across this transaction. In
	the ideal case through a suspend/resume cycle:
		* don't remove device: device stays attached
		* remove device: device detaches on resume
		* add new device: device attaches on resume
		* remove and re-add device: device detaches and re-attaches
		  on resume

	This works in some configurations, but not always.
>How-To-Repeat:
	Attach a USB device, suspend and resume, inspect dmesg to see if
	the device detaches and reattaches.
>Fix:
	Not known.

>Release-Note:

>Audit-Trail:

From: Matthias Drochner <M.Drochner@fz-juelich.de>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org,
	netbsd-bugs@NetBSD.org
Subject: Re: kern/37459: USB device issues on suspend/resume 
Date: Fri, 07 Dec 2007 23:13:18 +0100

 jmcneill@invisible.ca said:
 > 		* don't remove device: device stays attached
 > 		* remove device: device detaches on resume
 > 		* add new device: device attaches on resume 

 The code in uhub.c:uhub_explore() is called on many occasions, it should
 be able to catch these cases. As long as there are no bogus hub status
 bits in the process... If there a problems one should first find out
 what the parent device is (uhci/ohci/ehci/uhub) and check whether it
 behaves strange on suspend/resume.

 >		* remove and re-add device: device detaches and re-attaches
 >		  on resume

 That's complicated, considering the different cases if the same device,
 a similar one or a completely different are attached. The USB hub
 likely doesn't notice by itself, unless the speed changes on an ehci.
 (need to check the specs though)
 The right solution would probably be to read some VPD or so after each resume,
 but this is beyond the scope of your power management work... it
 touches jachym's SOC project, I'd wait at least until this has settled.

 best regards
 Matthias




 -------------------------------------------------------------------
 -------------------------------------------------------------------
 Forschungszentrum Juelich GmbH
 52425 Juelich

 Sitz der Gesellschaft: Juelich
 Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
 Vorsitzende des Aufsichtsrats: MinDirig'in Baerbel Brumme-Bothe
 Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
 Dr. Ulrich Krafft (stellv. Vorsitzender), Dr. Sebastian M. Schmidt
 -------------------------------------------------------------------
 -------------------------------------------------------------------

State-Changed-From-To: open->suspended
State-Changed-By: jmcneill@NetBSD.org
State-Changed-When: Mon, 22 Sep 2008 00:35:44 +0000
State-Changed-Why:
Not really a bug; USB port suspend works as designed when the hardware
doesn't cut power out from under us.


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