NetBSD Problem Report #39332

From hackerb9@quince.wongs.net  Sun Aug 10 10:54:43 2008
Return-Path: <hackerb9@quince.wongs.net>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 77EB663BB81
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 10 Aug 2008 10:54:43 +0000 (UTC)
Message-Id: <20080810105252.7DC4023708@quince.wongs.net>
Date: Sun, 10 Aug 2008 03:52:49 -0700 (PDT)
From: ben@wongs.net
Reply-To: ben@wongs.net
To: gnats-bugs@gnats.NetBSD.org
Subject: USB quirk UQ_ASSUME_CM_OVER_DATA is not a quirk
X-Send-Pr-Version: 3.95

>Number:         39332
>Category:       kern
>Synopsis:       USB quirk UQ_ASSUME_CM_OVER_DATA is not a quirk
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 10 10:55:00 +0000 2008
>Last-Modified:  Thu Aug 14 11:35:01 +0000 2008
>Originator:     Ben Wong
>Release:        NetBSD 4.0
>Organization:

>Environment:


System: NetBSD quince.wongs.net 4.0 NetBSD 4.0 (GENERIC) #0: Sat Dec 15 22:00:07 PST 2007 builds@wb46:/home/builds/ab/netbsd-4-0-RELEASE/hpcmips/200712160005Z-obj/home/builds/ab/netbsd-4-0-RELEASE/src/sys/arch/hpcmips/compile/GENERIC hpcmips
Architecture: mipsel
Machine: hpcmips
>Description:

The UQ_ASSUME_CM_OVER_DATA quirk should be removed from the kernel.
It is not a "quirk", it is needed by many devices and harmful to none.
FreeBSD has already done so.

  http://freebsd.monkey.org/freebsd-cvs-all/200706/msg02872.html

>How-To-Repeat:

Step 1. Plug in any USB modem that is not listed in the quirk file.
     	(For example, I have a Samsung N400 cell phone).

Step 2. Notice that the kernel configures umodem but NOT ucom.  As the
     	umodem man page indicates, umodem is useless without ucom.

        quince /netbsd: umodem0 at uhub0 port 1 configuration 1 interface 0
	quince /netbsd: 
	quince /netbsd: umodem0: SAMSUNG Electronics Co.,Ltd. SAMSUNG CDMA Technologies, rev 1.01/0.00, addr 2, iclass 2/2
	quince /netbsd: umodem0: data interface 1, has CM over data, has break
	quince /netbsd: umodem0: could not set data multiplex mode

Step 3. Add the device to the USB quirks file, as detailed in 
     	http://www.bsdforums.org/forums/archive/index.php/t-15517.html

Step 4. Start recompiling the kernel.

Step 5. (Optional) Gnash teeth in anguish upon realizing that it might
     	take weeks for the kernel to recompile on your little 133MHz
     	NetBSD/hpcmips computer.

>Fix:

The NetBSD kernel should not require this quirk in the first place.  I
apologize for not including a patch, my machine is not up to the task.
However, as FreeBSD has demonstrated, it should be a simple fix. Here
are the relevant diffs:

  http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/usb/umodem.c.diff?r1=1.67;r2=1.68

  http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/usb/usb_quirks.c.diff?r1=1.59;r2=1.60

  http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/usb/usb_quirks.h.diff?r1=1.23;r2=1.24

>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/39332: USB quirk UQ_ASSUME_CM_OVER_DATA is not a quirk 
Date: Tue, 12 Aug 2008 20:22:29 +0200

 ben@wongs.net said:
 > It is not a "quirk", it is needed by many devices and harmful to none.
 > FreeBSD has already done so. 

 So besides the fact that the quirk should be removed, the
 functional change would be to ignore errors of the
 "set feature" request. This generally looks acceptable to me,
 but a little more understanding would be better.
 Did you check which error was returned? The "set feature" request
 is described in the spec, so there might be a mistake elsewhere.

 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: MinDir'in Baerbel Brumme-Bothe
 Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
 Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
 Dr. Sebastian M. Schmidt
 -------------------------------------------------------------------
 -------------------------------------------------------------------

From: ben@wongs.net
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/39332: USB quirk UQ_ASSUME_CM_OVER_DATA is not a quirk
Date: Thu, 14 Aug 2008 06:33:52 -0500

 Matthias,

 I'd like to find out what the exact error is as well.

 Please pardon my ignorance, but is there some way to enable kernel
 debugging (e.g., setting umodemdebug) without recompiling the kernel?
 I tried looking around for boot flags or sysctl tweaks but came up
 with nothing in the man pages.

 Thanks,

 Ben

 On 8/12/08, Matthias Drochner <M.Drochner@fz-juelich.de> wrote:
 > The following reply was made to PR kern/39332; it has been noted by GNATS.
 >
 > 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/39332: USB quirk UQ_ASSUME_CM_OVER_DATA is not a quirk
 > Date: Tue, 12 Aug 2008 20:22:29 +0200
 >
 >  ben@wongs.net said:
 >  > It is not a "quirk", it is needed by many devices and harmful to none.
 >  > FreeBSD has already done so.
 >
 >  So besides the fact that the quirk should be removed, the
 >  functional change would be to ignore errors of the
 >  "set feature" request. This generally looks acceptable to me,
 >  but a little more understanding would be better.
 >  Did you check which error was returned? The "set feature" request
 >  is described in the spec, so there might be a mistake elsewhere.
 >
 >  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: MinDir'in Baerbel Brumme-Bothe
 >  Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
 >  Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
 >  Dr. Sebastian M. Schmidt
 >  -------------------------------------------------------------------
 >  -------------------------------------------------------------------
 >
 >

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