From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 19 04:10:10 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADA3216A4CF for ; Sun, 19 Dec 2004 04:10:10 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 773EF43D49 for ; Sun, 19 Dec 2004 04:10:10 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJ4AAbE065139 for ; Sun, 19 Dec 2004 04:10:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJ4AAdv065138; Sun, 19 Dec 2004 04:10:10 GMT (envelope-from gnats) Resent-Date: Sun, 19 Dec 2004 04:10:10 GMT Resent-Message-Id: <200412190410.iBJ4AAdv065138@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Toshiboumi Ohta Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB6D416A4CF for ; Sun, 19 Dec 2004 04:05:06 +0000 (GMT) Received: from eudora.timedia.co.jp (eudora.timedia.co.jp [218.225.123.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id 654BF43D49 for ; Sun, 19 Dec 2004 04:05:06 +0000 (GMT) (envelope-from bugbird@eudora.timedia.co.jp) Received: from eudora.timedia.co.jp (localhost [127.0.0.1]) by eudora.timedia.co.jp (8.12.11/8.12.5) with ESMTP id iBJ455iw035009 for ; Sun, 19 Dec 2004 13:05:05 +0900 (JST) (envelope-from bugbird@eudora.timedia.co.jp) Received: (from bugbird@localhost) by eudora.timedia.co.jp (8.12.11/8.12.6/Submit) id iBJ454WT035008; Sun, 19 Dec 2004 13:05:04 +0900 (JST) Message-Id: <200412190405.iBJ454WT035008@eudora.timedia.co.jp> Date: Sun, 19 Dec 2004 13:05:04 +0900 (JST) From: Toshiboumi Ohta To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/75249: 5.x install CD stack on VirtualPC Version 7 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Toshiboumi Ohta List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 04:10:10 -0000 >Number: 75249 >Category: kern >Synopsis: 5.x install CD stack on VirtualPC Version 7 >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Dec 19 04:10:09 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Toshiboumi Ohta >Release: FreeBSD 5.3-RELEASE i386 >Organization: Time Intermedia Corp >Environment: VirtualPC for Mac OS X Version 7 FreeBSD 5.3-RELEASE #0: Fri Nov 5 04:19:18 UTC 2004 root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Pentium Pro (234.12-MHz 686-class CPU) Origin = "Virtual CPU " Id = 0x684 >Description: the 5.x kernel from Install CD-ROM probing PnP ISA devices incorrectly, then hang up. belows are dying message on "boot -v" option. vt0: not probed (disabled) isa_probe_children: probing PnP devices adv1: Invalid baseport of 0x220 specified. Nearest valid baseport is 0x230. Fai ling probe. unknown: failed to probe at port 0x380-0x38f,0x220-0x22f irq 5 drq 5,1 on isa0 adv1: Invalid baseport of 0x201 specified. Nearest valid baseport is 0x210. Fai ling probe. unknown: failed to probe at port 0x201 on isa0 ->>HANG HERE<<- but unfortunately FreeBSD 4.x and RHL9 can boot up with no error. >How-To-Repeat: FreeBSD 5.2-RELEASE, 5.2.1-RELEASE, 5.3-RELEASE are hanging samely. some possible boot prompt options like "set hint...", "unload", etc... can not make any workarounds. >Fix: i have no idea, but kernel wizard could fix it. >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 19 04:21:50 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F18F416A4CF; Sun, 19 Dec 2004 04:21:49 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B9F843D41; Sun, 19 Dec 2004 04:21:49 +0000 (GMT) (envelope-from tjr@FreeBSD.org) Received: from freefall.freebsd.org (tjr@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJ4LnDv065658; Sun, 19 Dec 2004 04:21:49 GMT (envelope-from tjr@freefall.freebsd.org) Received: (from tjr@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJ4LlP6065654; Sun, 19 Dec 2004 04:21:47 GMT (envelope-from tjr) Date: Sun, 19 Dec 2004 04:21:47 GMT From: "Tim J. Robbins" Message-Id: <200412190421.iBJ4LlP6065654@freefall.freebsd.org> To: mi+mx@aldan.algebra.com, tjr@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: bin/43675: uniq prints last, not first of the identical lines [patch] X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 04:21:50 -0000 Synopsis: uniq prints last, not first of the identical lines [patch] State-Changed-From-To: open->closed State-Changed-By: tjr State-Changed-When: Sun Dec 19 04:21:21 GMT 2004 State-Changed-Why: Changed in 5-STABLE and 6-CURRENT; will not be changed in RELENG_4. http://www.freebsd.org/cgi/query-pr.cgi?pr=43675 From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 19 04:24:48 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9ADF916A4CF; Sun, 19 Dec 2004 04:24:48 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7012F43D49; Sun, 19 Dec 2004 04:24:48 +0000 (GMT) (envelope-from tjr@FreeBSD.org) Received: from freefall.freebsd.org (tjr@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJ4Omok065767; Sun, 19 Dec 2004 04:24:48 GMT (envelope-from tjr@freefall.freebsd.org) Received: (from tjr@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJ4OmVp065763; Sun, 19 Dec 2004 04:24:48 GMT (envelope-from tjr) Date: Sun, 19 Dec 2004 04:24:48 GMT From: "Tim J. Robbins" Message-Id: <200412190424.iBJ4OmVp065763@freefall.freebsd.org> To: tjr@FreeBSD.org, tjr@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: kern/68364: panic: Fatal trap 12 caused by kern/kern_descrip.c:2351 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 04:24:48 -0000 Synopsis: panic: Fatal trap 12 caused by kern/kern_descrip.c:2351 Responsible-Changed-From-To: tjr->freebsd-bugs Responsible-Changed-By: tjr Responsible-Changed-When: Sun Dec 19 04:24:31 GMT 2004 Responsible-Changed-Why: Unassigned due to lack of time. http://www.freebsd.org/cgi/query-pr.cgi?pr=68364 From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 19 04:26:04 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A970316A4CF; Sun, 19 Dec 2004 04:26:04 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8DA1543D41; Sun, 19 Dec 2004 04:26:04 +0000 (GMT) (envelope-from tjr@FreeBSD.org) Received: from freefall.freebsd.org (tjr@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJ4Q43d065888; Sun, 19 Dec 2004 04:26:04 GMT (envelope-from tjr@freefall.freebsd.org) Received: (from tjr@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJ4Q45D065884; Sun, 19 Dec 2004 04:26:04 GMT (envelope-from tjr) Date: Sun, 19 Dec 2004 04:26:04 GMT From: "Tim J. Robbins" Message-Id: <200412190426.iBJ4Q45D065884@freefall.freebsd.org> To: tjr@FreeBSD.org, tjr@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: kern/65901: [smbfs] smbfs fails fsx write/truncate-down/truncate-up/reread old write +FIX X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 04:26:04 -0000 Synopsis: [smbfs] smbfs fails fsx write/truncate-down/truncate-up/reread old write +FIX Responsible-Changed-From-To: tjr->freebsd-bugs Responsible-Changed-By: tjr Responsible-Changed-When: Sun Dec 19 04:25:45 GMT 2004 Responsible-Changed-Why: Unassign due to lack of time. http://www.freebsd.org/cgi/query-pr.cgi?pr=65901 From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 19 05:07:18 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58DB816A4CE; Sun, 19 Dec 2004 05:07:18 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B5DB43D1D; Sun, 19 Dec 2004 05:07:18 +0000 (GMT) (envelope-from gad@FreeBSD.org) Received: from freefall.freebsd.org (gad@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJ57IjZ071928; Sun, 19 Dec 2004 05:07:18 GMT (envelope-from gad@freefall.freebsd.org) Received: (from gad@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJ57InJ071924; Sun, 19 Dec 2004 05:07:18 GMT (envelope-from gad) Date: Sun, 19 Dec 2004 05:07:18 GMT From: Garance A Drosehn Message-Id: <200412190507.iBJ57InJ071924@freefall.freebsd.org> To: gad@FreeBSD.org, freebsd-bugs@FreeBSD.org, gad@FreeBSD.org Subject: Re: bin/74418: lpd creates lock file with bad permissions under remote LPR X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 05:07:18 -0000 Synopsis: lpd creates lock file with bad permissions under remote LPR Responsible-Changed-From-To: freebsd-bugs->gad Responsible-Changed-By: gad Responsible-Changed-When: Sun Dec 19 05:02:22 GMT 2004 Responsible-Changed-Why: I have occassionally seen this problem, even though I can not seem to reproduce it at the moment. However, I can add an appropriate call to umask() in 6.x-current which will fix this, and I will later MFC that to 5.3-stable. I have no plans to MFC it into the 4.x-branch -- certainly not into 4.9! http://www.freebsd.org/cgi/query-pr.cgi?pr=74418 From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 19 05:40:30 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7197716A4CE for ; Sun, 19 Dec 2004 05:40:30 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C89943D48 for ; Sun, 19 Dec 2004 05:40:30 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJ5eRd5075776 for ; Sun, 19 Dec 2004 05:40:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJ5eRvf075775; Sun, 19 Dec 2004 05:40:27 GMT (envelope-from gnats) Resent-Date: Sun, 19 Dec 2004 05:40:27 GMT Resent-Message-Id: <200412190540.iBJ5eRvf075775@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ken Westerback Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2351816A4CE for ; Sun, 19 Dec 2004 05:36:30 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 18B1943D31 for ; Sun, 19 Dec 2004 05:36:30 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJ5aT6L095896 for ; Sun, 19 Dec 2004 05:36:29 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id iBJ5aT7j095880; Sun, 19 Dec 2004 05:36:29 GMT (envelope-from nobody) Message-Id: <200412190536.iBJ5aT7j095880@www.freebsd.org> Date: Sun, 19 Dec 2004 05:36:29 GMT From: Ken Westerback To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: kern/75250: timedout_scbs is not initialized with LIST_INIT() X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 05:40:30 -0000 >Number: 75250 >Category: kern >Synopsis: timedout_scbs is not initialized with LIST_INIT() >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Dec 19 05:40:27 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Ken Westerback >Release: n/a >Organization: OpenBSD >Environment: n/a (OpenBSD) >Description: The list timedout_scbs in ahd_softc is not initialized anywhere I can find. The diff below adds a LIST_INIT(&ahd->timedout_scbs) to ahd_alloc(), which is where the similar list pending_scbs is initialized. Found while trying to upgrade the OpenBSD ahd driver with the latest FreeBSD goodies. I note that a similar problem may exist on ahc, but I haven't started sync'ing ahc yet. >How-To-Repeat: >Fix: Index: aic79xx.c =================================================================== RCS file: /home/ncvs/src/sys/dev/aic7xxx/aic79xx.c,v retrieving revision 1.33 diff -u -r1.33 aic79xx.c --- aic79xx.c 18 Nov 2004 20:22:30 -0000 1.33 +++ aic79xx.c 19 Dec 2004 05:23:19 -0000 @@ -5246,6 +5246,7 @@ return (NULL); } LIST_INIT(&ahd->pending_scbs); + LIST_INIT(&ahd->timedout_scbs); /* We don't know our unit number until the OSM sets it */ ahd->name = name; ahd->unit = -1; >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 19 06:40:53 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8454816A4CE; Sun, 19 Dec 2004 06:40:53 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 60E1843D1D; Sun, 19 Dec 2004 06:40:53 +0000 (GMT) (envelope-from anholt@FreeBSD.org) Received: from freefall.freebsd.org (anholt@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJ6erCX097777; Sun, 19 Dec 2004 06:40:53 GMT (envelope-from anholt@freefall.freebsd.org) Received: (from anholt@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJ6eqnM097773; Sun, 19 Dec 2004 06:40:53 GMT (envelope-from anholt) Date: Sun, 19 Dec 2004 06:40:53 GMT From: Eric Anholt Message-Id: <200412190640.iBJ6eqnM097773@freefall.freebsd.org> To: valeks@valabs.spb.ru, anholt@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: kern/50298: [hang] unlimited usage of AGP memory make system hung X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 06:40:53 -0000 Synopsis: [hang] unlimited usage of AGP memory make system hung State-Changed-From-To: feedback->closed State-Changed-By: anholt State-Changed-When: Sun Dec 19 06:38:45 GMT 2004 State-Changed-Why: Feedback timeout, > 3 months. Couldn't reproduce. http://www.freebsd.org/cgi/query-pr.cgi?pr=50298 From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 19 08:20:24 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 492A516A4CE for ; Sun, 19 Dec 2004 08:20:24 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A93A43D5C for ; Sun, 19 Dec 2004 08:20:24 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJ8KNCi028636 for ; Sun, 19 Dec 2004 08:20:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJ8KNrV028635; Sun, 19 Dec 2004 08:20:23 GMT (envelope-from gnats) Resent-Date: Sun, 19 Dec 2004 08:20:23 GMT Resent-Message-Id: <200412190820.iBJ8KNrV028635@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Oleg V. Nauman" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A75BB16A4CE for ; Sun, 19 Dec 2004 08:19:09 +0000 (GMT) Received: from core.zp.ua (core.zp.ua [193.108.112.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id C576D43D2F for ; Sun, 19 Dec 2004 08:19:07 +0000 (GMT) (envelope-from oleg@core.zp.ua) Received: from core.zp.ua (oleg@localhost [127.0.0.1]) by core.zp.ua with ESMTP id iBJ8J39L022028 for ; Sun, 19 Dec 2004 10:19:03 +0200 (EET) (envelope-from oleg@core.zp.ua) Received: (from oleg@localhost) by core.zp.ua id iBJ8J3Pd022027; Sun, 19 Dec 2004 10:19:03 +0200 (EET) Message-Id: <200412190819.iBJ8J3Pd022027@core.zp.ua> Date: Sun, 19 Dec 2004 10:19:03 +0200 (EET) From: "Oleg V. Nauman" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/75253: [patch] xl(4): add support for 3C920B-EMB-WNM Integrated Fast Ethernet Controller X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Oleg V. Nauman" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 08:20:24 -0000 >Number: 75253 >Category: kern >Synopsis: [patch] xl(4): add support for 3C920B-EMB-WNM Integrated Fast Ethernet Controller >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Dec 19 08:20:23 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Oleg V. Nauman >Release: FreeBSD 5.3-STABLE i386 >Organization: ReIS LLC >Environment: System: FreeBSD daisy.reis.zp.ua 5.3-STABLE FreeBSD 5.3-STABLE #5: Fri Dec 17 17:29:02 EET 2004 root@daisy.reis.zp.ua:/usr/src/sys/i386/compile/DAISY i386 >Description: I have motherboard with integrated 3Com ethernet controller, listed from pciconf output as: xl0@pci2:8:0: class=0x020000 card=0xffffffff chip=0x920210b7 rev=0x40 hdr=0x00 vendor = '3COM Corp, Networking Division' device = '3C920B-EMB-WNM Integrated Fast Ethernet Controller' class = network subclass = ethernet but current xl(4) driver does not have support for this controller. Very trivial patch adds support for him, and this controller seems working OK (tested with heavy NFS traffic): xl0: <3Com 3c920B-EMB-WNM Integrated Fast Etherlink XL> port 0xec00-0xec7f mem 0xfe100000-0xfe10007f irq 3 at device 8.0 on pci2 miibus1: on xl0 xl0: Ethernet address: 00:11:2f:44:6f:87 xl0: flags=8843 mtu 1500 options=9 inet 10.20.30.211 netmask 0xffffff00 broadcast 10.20.30.255 ether 00:11:2f:44:6f:87 media: Ethernet autoselect (100baseTX) status: active And supports at least autonegotiation without any problems. >How-To-Repeat: >Fix: --- /usr/src/sys/pci/if_xl.c.orig Fri Nov 12 10:53:08 2004 +++ /usr/src/sys/pci/if_xl.c Fri Dec 17 16:31:46 2004 @@ -188,6 +188,8 @@ "3Com 3c905C-TX Fast Etherlink XL" }, { TC_VENDORID, TC_DEVICEID_TORNADO_10_100BT_920B, "3Com 3c920B-EMB Integrated Fast Etherlink XL" }, + { TC_VENDORID, TC_DEVICEID_TORNADO_10_100BT_920B_WNM, + "3Com 3c920B-EMB-WNM Integrated Fast Etherlink XL" }, { TC_VENDORID, TC_DEVICEID_HURRICANE_10_100BT_SERV, "3Com 3c980 Fast Etherlink XL" }, { TC_VENDORID, TC_DEVICEID_TORNADO_10_100BT_SERV, @@ -1172,6 +1174,7 @@ case TC_DEVICEID_HURRICANE_656B: /* 3c656B */ case TC_DEVICEID_TORNADO_656C: /* 3c656C */ case TC_DEVICEID_TORNADO_10_100BT_920B: /* 3c920B-EMB */ + case TC_DEVICEID_TORNADO_10_100BT_920B_WNM: /* 3c920B-EMB-WNM */ sc->xl_media = XL_MEDIAOPT_MII; sc->xl_xcvr = XL_XCVR_MII; if (verbose) @@ -1269,7 +1272,8 @@ did == TC_DEVICEID_HURRICANE_656B) sc->xl_flags |= XL_FLAG_INVERT_MII_PWR | XL_FLAG_INVERT_LED_PWR; - if (did == TC_DEVICEID_TORNADO_10_100BT_920B) + if (did == TC_DEVICEID_TORNADO_10_100BT_920B || + did == TC_DEVICEID_TORNADO_10_100BT_920B_WNM) sc->xl_flags |= XL_FLAG_PHYOK; switch (did) { --- /usr/src/sys/pci/if_xlreg.h.orig Sun Aug 22 14:42:15 2004 +++ /usr/src/sys/pci/if_xlreg.h Fri Dec 17 16:26:33 2004 @@ -680,6 +680,7 @@ #define TC_DEVICEID_CYCLONE_10_100FX 0x905A #define TC_DEVICEID_TORNADO_10_100BT 0x9200 #define TC_DEVICEID_TORNADO_10_100BT_920B 0x9201 +#define TC_DEVICEID_TORNADO_10_100BT_920B_WNM 0x9202 #define TC_DEVICEID_HURRICANE_10_100BT_SERV 0x9800 #define TC_DEVICEID_TORNADO_10_100BT_SERV 0x9805 #define TC_DEVICEID_HURRICANE_SOHO100TX 0x7646 >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 19 08:50:24 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DFBC116A4CF for ; Sun, 19 Dec 2004 08:50:24 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFD1243D5C for ; Sun, 19 Dec 2004 08:50:24 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJ8oOax044077 for ; Sun, 19 Dec 2004 08:50:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJ8oOlg044076; Sun, 19 Dec 2004 08:50:24 GMT (envelope-from gnats) Resent-Date: Sun, 19 Dec 2004 08:50:24 GMT Resent-Message-Id: <200412190850.iBJ8oOlg044076@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Vaclav Belak Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 604EA16A4CE for ; Sun, 19 Dec 2004 08:48:01 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E48643D3F for ; Sun, 19 Dec 2004 08:48:01 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJ8m0VC078313 for ; Sun, 19 Dec 2004 08:48:00 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id iBJ8m0aw078312; Sun, 19 Dec 2004 08:48:00 GMT (envelope-from nobody) Message-Id: <200412190848.iBJ8m0aw078312@www.freebsd.org> Date: Sun, 19 Dec 2004 08:48:00 GMT From: Vaclav Belak To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: kern/75254: PRISM3-based adapter ZCOM XI330 doesn't work with wi driver X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 08:50:25 -0000 >Number: 75254 >Category: kern >Synopsis: PRISM3-based adapter ZCOM XI330 doesn't work with wi driver >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Dec 19 08:50:24 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Vaclav Belak >Release: FreeBSD 5.3 >Organization: VSE (University of Economics in Prague) >Environment: FreeBSD kamala 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Mon Dec 13 1 root@:/usr/src/sys/i386/compile/KAMALA i386 >Description: The wi driver in FreeBSD 5.3 doesn't recognize my PRISM3 based ZCOM XI330 PCMCIA wifi adapter. >How-To-Repeat: >Fix: It is possible to fix this problem with these patches i wrote: http://landru.wz.cz/xi330-patches-wi.tar.bz2 >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 19 14:50:21 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C230C16A4CE for ; Sun, 19 Dec 2004 14:50:21 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 85AAD43D5E for ; Sun, 19 Dec 2004 14:50:21 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJEoLqL074616 for ; Sun, 19 Dec 2004 14:50:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJEoL8U074614; Sun, 19 Dec 2004 14:50:21 GMT (envelope-from gnats) Resent-Date: Sun, 19 Dec 2004 14:50:21 GMT Resent-Message-Id: <200412191450.iBJEoL8U074614@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Oleg V. Nauman" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE01216A4CE for ; Sun, 19 Dec 2004 14:47:54 +0000 (GMT) Received: from core.zp.ua (core.zp.ua [193.108.112.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C43043D48 for ; Sun, 19 Dec 2004 14:47:53 +0000 (GMT) (envelope-from oleg@core.zp.ua) Received: from core.zp.ua (oleg@localhost [127.0.0.1]) by core.zp.ua with ESMTP id iBJElonT025667 for ; Sun, 19 Dec 2004 16:47:50 +0200 (EET) (envelope-from oleg@core.zp.ua) Received: (from oleg@localhost) by core.zp.ua id iBJEln8f025666; Sun, 19 Dec 2004 16:47:49 +0200 (EET) Message-Id: <200412191447.iBJEln8f025666@core.zp.ua> Date: Sun, 19 Dec 2004 16:47:49 +0200 (EET) From: "Oleg V. Nauman" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/75258: [patch] dd(1) has not async signal safe interrupt handlers X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Oleg V. Nauman" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 14:50:22 -0000 >Number: 75258 >Category: bin >Synopsis: [patch] dd(1) has not async signal safe interrupt handlers >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Dec 19 14:50:21 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Oleg V. Nauman >Release: FreeBSD 5.3-STABLE i386 >Organization: ReIS LLC >Environment: System: FreeBSD core.zp.ua 5.3-STABLE FreeBSD 5.3-STABLE #16: Fri Dec 17 22:26:44 EET 2004 root@core.zp.ua:/usr/src/sys/i386/compile/core i386 >Description: dd(1) uses not safe interrupt handlers, they may leads to strange problems with dd >How-To-Repeat: man 2 sigaction >Fix: diff -u /usr/src/bin/dd/dd.c dd/dd.c --- /usr/src/bin/dd/dd.c Fri Oct 1 18:30:06 2004 +++ dd/dd.c Sun Dec 19 11:31:44 2004 @@ -89,7 +89,7 @@ jcl(argv); setup(); - (void)signal(SIGINFO, summaryx); + (void)signal(SIGINFO, siginfo_handler); (void)signal(SIGINT, terminate); atexit(summary); @@ -311,6 +311,7 @@ if (!(ddflags & C_NOERROR)) err(1, "%s", in.name); warn("%s", in.name); + need_summary = 0; summary(); /* @@ -368,6 +369,10 @@ in.dbp += in.dbrcnt; (*cfunc)(); + if (need_summary) { + need_summary = 0; + summary(); + } } } diff -u /usr/src/bin/dd/extern.h dd/extern.h --- /usr/src/bin/dd/extern.h Fri Oct 1 18:30:06 2004 +++ dd/extern.h Sun Dec 19 11:32:53 2004 @@ -43,7 +43,7 @@ void pos_in(void); void pos_out(void); void summary(void); -void summaryx(int); +void siginfo_handler(int); void terminate(int); void unblock(void); void unblock_close(void); @@ -61,3 +61,5 @@ extern const u_char a2ibm_32V[], a2ibm_POSIX[]; extern u_char casetab[]; extern char fill_char; + +int need_summary; diff -u /usr/src/bin/dd/misc.c dd/misc.c --- /usr/src/bin/dd/misc.c Fri Oct 1 18:30:06 2004 +++ dd/misc.c Sun Dec 19 11:32:01 2004 @@ -85,13 +85,9 @@ } /* ARGSUSED */ -void -summaryx(int notused __unused) +void siginfo_handler(int signo __unused) { - int save_errno = errno; - - summary(); - errno = save_errno; + need_summary = 1; } /* ARGSUSED */ @@ -102,3 +98,4 @@ summary(); _exit(sig == 0 ? 0 : 1); } + diff -u /usr/src/bin/dd/position.c dd/position.c --- /usr/src/bin/dd/position.c Fri Oct 1 18:30:06 2004 +++ dd/position.c Sun Dec 19 11:33:19 2004 @@ -91,6 +91,10 @@ } } else --cnt; + if (need_summary) { + need_summary = 0; + summary(); + } continue; } @@ -111,6 +115,7 @@ if (!warned) { warn("%s", in.name); warned = 1; + need_summary = 0; summary(); } continue; >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 19 15:20:44 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5BEE16A567 for ; Sun, 19 Dec 2004 15:20:44 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B3D0243D48 for ; Sun, 19 Dec 2004 15:20:29 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJFKTxa079347 for ; Sun, 19 Dec 2004 15:20:29 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJFKT8n079346; Sun, 19 Dec 2004 15:20:29 GMT (envelope-from gnats) Date: Sun, 19 Dec 2004 15:20:29 GMT Message-Id: <200412191520.iBJFKT8n079346@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Maxim Konovalov Subject: Re: bin/75258: [patch] dd(1) has not async signal safe interrupt handlers X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Maxim Konovalov List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 15:20:45 -0000 The following reply was made to PR bin/75258; it has been noted by GNATS. From: Maxim Konovalov To: "Oleg V. Nauman" Cc: bug-followup@freebsd.org Subject: Re: bin/75258: [patch] dd(1) has not async signal safe interrupt handlers Date: Sun, 19 Dec 2004 18:11:06 +0300 (MSK) [...] > >Description: > dd(1) uses not safe interrupt handlers, they may leads to > strange problems with dd Are you sure? Do you have a testcase? > >How-To-Repeat: > > man 2 sigaction Well, stdio(3) is not signal-safe in general but it seems for me summary() does not manipulate with the internal state of any file descriptors (it uses write(2)) and should be safe. Browseing the commit history says the same. [...] > +int need_summary; This should be volatile sig_atomic_t. -- Maxim Konovalov From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 19 15:30:25 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A5FAC16A4CE for ; Sun, 19 Dec 2004 15:30:25 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 931DB43D1F for ; Sun, 19 Dec 2004 15:30:25 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJFUPiQ079593 for ; Sun, 19 Dec 2004 15:30:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJFUPXC079591; Sun, 19 Dec 2004 15:30:25 GMT (envelope-from gnats) Date: Sun, 19 Dec 2004 15:30:25 GMT Message-Id: <200412191530.iBJFUPXC079591@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: "Oleg V. Nauman" Subject: Re: bin/75258: [patch] dd(1) has not async signal safe interrupt handlers X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Oleg V. Nauman" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 15:30:25 -0000 The following reply was made to PR bin/75258; it has been noted by GNATS. From: "Oleg V. Nauman" To: Maxim Konovalov Cc: bug-followup@freebsd.org Subject: Re: bin/75258: [patch] dd(1) has not async signal safe interrupt handlers Date: Sun, 19 Dec 2004 17:29:59 +0200 --VrqPEDrXMn8OVzN4 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 19, 2004 at 06:11:06PM +0300, Maxim Konovalov wrote: > [...] > > >Description: > > dd(1) uses not safe interrupt handlers, they may leads to > > strange problems with dd >=20 > Are you sure? Do you have a testcase? No, sorry. >=20 > > >How-To-Repeat: > > > > man 2 sigaction >=20 > Well, stdio(3) is not signal-safe in general but it seems for me > summary() does not manipulate with the internal state of any file > descriptors (it uses write(2)) and should be safe. But s*printf() family uses malloc(3) for his internal purposes, and there is no any reasons for things like memory allocations in the signal handler, I think. >=20 > Browseing the commit history says the same. >=20 > [...] > > +int need_summary; >=20 > This should be volatile sig_atomic_to. Yes, you are right, thank you. >=20 > --=20 > Maxim Konovalov --=20 NO37-RIPE --VrqPEDrXMn8OVzN4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: PGP 6.5.8 iQCVAwUBQcWeZ/C2y8Tb/5DvAQFWZgP/YY9BfKFkTS1Tjp/9B5iEz85TJAHjslV1 UvK0TlY0LX/R7DWf3d9JUY9KB6NRscuIpoGz5aIH9X4SAZXwzAdUrGHupmOmF8DZ VxlBbPjM2f/saexVzKOw6MURaxZC3JAW5K4jLACSIPEQeSUTMcQJQqopnYQ7bBHK iWc2Iy/FtfY= =WXGA -----END PGP SIGNATURE----- --VrqPEDrXMn8OVzN4-- From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 19 16:30:29 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A99716A4CE for ; Sun, 19 Dec 2004 16:30:29 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A91443D53 for ; Sun, 19 Dec 2004 16:30:29 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJGUSId085869 for ; Sun, 19 Dec 2004 16:30:28 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJGUSUU085867; Sun, 19 Dec 2004 16:30:28 GMT (envelope-from gnats) Resent-Date: Sun, 19 Dec 2004 16:30:28 GMT Resent-Message-Id: <200412191630.iBJGUSUU085867@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Matthew D.Fuller" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C470A16A4CE for ; Sun, 19 Dec 2004 16:20:20 +0000 (GMT) Received: from mortis.over-yonder.net (adsl-155-73-249.jan.bellsouth.net [68.155.73.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EBAA43D39 for ; Sun, 19 Dec 2004 16:20:20 +0000 (GMT) (envelope-from fullermd@over-yonder.net) Received: by mortis.over-yonder.net (Postfix, from userid 100) id 4F960210DB; Sun, 19 Dec 2004 10:20:19 -0600 (CST) Message-Id: <20041219162019.4F960210DB@mortis.over-yonder.net> Date: Sun, 19 Dec 2004 10:20:19 -0600 (CST) From: "Matthew D.Fuller" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/75259: [PATCH] repquota(8) field size a smidge too small X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Matthew D.Fuller" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 16:30:29 -0000 >Number: 75259 >Category: bin >Synopsis: [PATCH] repquota(8) field size a smidge too small >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Dec 19 16:30:27 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Matthew D. Fuller >Release: FreeBSD 5.3-STABLE i386 >Organization: >Environment: System: FreeBSD mortis.sighup.org 5.3-STABLE FreeBSD 5.3-STABLE #0: Sat Nov 20 10:24:06 CST 2004 fullermd@mortis:/usr/obj/usr/src/sys/MORTIS i386 >Description: repquota(8) lists out the quota information for all users on the system. The first field, naturally, contains the username. It's awful convenient and tempting to pipe the output to sort(1) or the like. However, that will break all over you if there's a username that's up at the max size (16). >How-To-Repeat: Add a user with a 16-char username, put in a bunch of files, then do a repquota | sort -n +2 and see if they're near the bottom. >Fix: Index: repquota.c =================================================================== RCS file: /usr/cvs/src/usr.sbin/repquota/repquota.c,v retrieving revision 1.18 diff -u -r1.18 repquota.c --- repquota.c 7 Aug 2004 04:28:54 -0000 1.18 +++ repquota.c 19 Dec 2004 16:14:48 -0000 @@ -229,9 +229,9 @@ } fclose(qf); printf("%*s Block limits File limits\n", - max(UT_NAMESIZE,10), " "); + max(UT_NAMESIZE+1,10), " "); printf("User%*s used soft hard grace used soft hard grace\n", - max(UT_NAMESIZE,10), " "); + max(UT_NAMESIZE+1,10), " "); for (id = 0; id <= highid[type]; id++) { fup = lookup(id, type); if (fup == 0) @@ -239,7 +239,7 @@ if (fup->fu_dqblk.dqb_curinodes == 0 && fup->fu_dqblk.dqb_curblocks == 0) continue; - printf("%-*s", max(UT_NAMESIZE,10), fup->fu_name); + printf("%-*s", max(UT_NAMESIZE+1,10), fup->fu_name); printf("%c%c %8lu %8lu %8lu %6s", fup->fu_dqblk.dqb_bsoftlimit && fup->fu_dqblk.dqb_curblocks >= >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 19 18:04:59 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C48516A4CE; Sun, 19 Dec 2004 18:04:59 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 142AA43D41; Sun, 19 Dec 2004 18:04:59 +0000 (GMT) (envelope-from maxim@FreeBSD.org) Received: from freefall.freebsd.org (maxim@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJI4wx0095305; Sun, 19 Dec 2004 18:04:58 GMT (envelope-from maxim@freefall.freebsd.org) Received: (from maxim@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJI4wAu095301; Sun, 19 Dec 2004 18:04:58 GMT (envelope-from maxim) Date: Sun, 19 Dec 2004 18:04:58 GMT From: Maxim Konovalov Message-Id: <200412191804.iBJI4wAu095301@freefall.freebsd.org> To: fullermd@over-yonder.net, maxim@FreeBSD.org, freebsd-bugs@FreeBSD.org, maxim@FreeBSD.org Subject: Re: bin/75259: [PATCH] repquota(8) field size a smidge too small X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 18:04:59 -0000 Synopsis: [PATCH] repquota(8) field size a smidge too small State-Changed-From-To: open->patched State-Changed-By: maxim State-Changed-When: Sun Dec 19 18:03:48 GMT 2004 State-Changed-Why: An equal diff was committed to -CURRENT, thanks! Responsible-Changed-From-To: freebsd-bugs->maxim Responsible-Changed-By: maxim Responsible-Changed-When: Sun Dec 19 18:03:48 GMT 2004 Responsible-Changed-Why: MFC reminder. http://www.freebsd.org/cgi/query-pr.cgi?pr=75259 From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 19 18:50:23 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5258E16A4CE for ; Sun, 19 Dec 2004 18:50:23 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 008B743D46 for ; Sun, 19 Dec 2004 18:50:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJIoMSd001393 for ; Sun, 19 Dec 2004 18:50:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJIoMaH001389; Sun, 19 Dec 2004 18:50:22 GMT (envelope-from gnats) Resent-Date: Sun, 19 Dec 2004 18:50:22 GMT Resent-Message-Id: <200412191850.iBJIoMaH001389@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Kazuhito HONDA Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DDE1516A4CE for ; Sun, 19 Dec 2004 18:42:04 +0000 (GMT) Received: from t-mta1.odn.ne.jp (mfep1.odn.ne.jp [143.90.131.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 18F0343D4C for ; Sun, 19 Dec 2004 18:42:03 +0000 (GMT) (envelope-from kazuhito@ph.noda.tus.ac.jp) Received: from localhost ([219.66.84.206]) by t-mta1.odn.ne.jp with ESMTP id <20041219184158657.TQXY.199623.t-mta1.odn.ne.jp@mta1.odn.ne.jp>; Mon, 20 Dec 2004 03:41:58 +0900 Message-Id: <20041220.034157.846933450.kazuhito@ph.noda.tus.ac.jp> Date: Mon, 20 Dec 2004 03:41:57 +0900 (JST) From: Kazuhito HONDA To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: kazuhito@ph.noda.tus.ac.jp Subject: kern/75274: Updating of USB audio codes (uaudio*.*) along recent NetBSD's X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Kazuhito HONDA List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 18:50:23 -0000 >Number: 75274 >Category: kern >Synopsis: Updating of USB audio codes (uaudio*.*) along recent NetBSD's >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Dec 19 18:50:22 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Kazuhito HONDA >Release: FreeBSD 6.0-CURRENT i386 >Organization: >Environment: System: FreeBSD kaoru 6.0-CURRENT FreeBSD 6.0-CURRENT #191: Mon Dec 20 02:28:37 JST 2004 root@kaoru:/usr/obj/src/sys/i386/compile/KAORU.6.0B.0 i386 USB audio device: Sound Blaster Digital Music (SBDM, Creative Labs.) >Description: Codes for USB audio in FreeBSD have several problems. 1. Only one volume controllor even if the device has many volume controllor 2. Can't select a sound source for recording 3. Can't record 4. play in wrong sampling rate For solving these problems, especially 1. 2., It is convenient to update FreeBSD uaudio codes along recent NetBSD uaudio codes. Unfortunately USB audio device doesn't play if you don't set correct sampling rate of USB audio device after updating. But, before updating, USB audio device play in wrong sampling rate for sound source if source sampling rate is not equal to device sampling rate. I expect that the formaer is better. >How-To-Repeat: >Fix: This patch is very long. So I expect that the code check will be very hard. I recommend that the checker will compare the patched files with recent NetBSD's files, and compare its difference with the difference between old FreeBSD files and old NetBSD files. --- F_41-91.diff begins here --- --- src/sys/dev/sound/usb/uaudio.c Mon Dec 20 01:48:43 2004 +++ src/sys/dev/sound/usb/uaudio-91.c Mon Dec 20 02:42:53 2004 @@ -1,5 +1,5 @@ -/* $NetBSD: uaudio.c,v 1.41 2001/01/23 14:04:13 augustss Exp $ */ -/* $FreeBSD: src/sys/dev/sound/usb/uaudio.c,v 1.7 2002/08/25 01:32:22 bde Exp $: */ +/* $NetBSD: uaudio.c,v 1.91 2004/11/05 17:46:14 kent Exp $ */ +/* $FreeBSD: src/sys/dev/sound/usb/uaudio-91.c,v $: */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -39,11 +39,16 @@ */ /* - * USB audio specs: http://www.usb.org/developers/data/devclass/audio10.pdf - * http://www.usb.org/developers/data/devclass/frmts10.pdf - * http://www.usb.org/developers/data/devclass/termt10.pdf + * USB audio specs: http://www.usb.org/developers/devclass_docs/audio10.pdf + * http://www.usb.org/developers/devclass_docs/frmts10.pdf + * http://www.usb.org/developers/devclass_docs/termt10.pdf */ +#include +#if defined(__NetBSD__) || defined(__OpenBSD__) +__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.91 2004/11/05 17:46:14 kent Exp $"); +#endif + #include #include #include @@ -66,11 +71,14 @@ #include #endif #include +#if defined(__FreeBSD__) #include +#endif #if defined(__NetBSD__) || defined(__OpenBSD__) #include #include +#include #include #include #elif defined(__FreeBSD__) @@ -83,23 +91,39 @@ #include #include +#if defined(__NetBSD__) || defined(__OpenBSD__) +#include +#elif defined(__FreeBSD__) #include #include +#endif +#if defined(__NetBSD__) || defined(__OpenBSD__) +/* #define UAUDIO_DEBUG */ +#else +/* #define USB_DEBUG */ +#endif +/* #define UAUDIO_MULTIPLE_ENDPOINTS */ #ifdef USB_DEBUG -#define DPRINTF(x) if (uaudiodebug) logprintf x -#define DPRINTFN(n,x) if (uaudiodebug>(n)) logprintf x +#define DPRINTF(x) do { if (uaudiodebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (uaudiodebug>(n)) logprintf x; } while (0) int uaudiodebug = 0; +#if defined(__FreeBSD__) SYSCTL_NODE(_hw_usb, OID_AUTO, uaudio, CTLFLAG_RW, 0, "USB uaudio"); SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, debug, CTLFLAG_RW, &uaudiodebug, 0, "uaudio debug level"); +#endif #else #define DPRINTF(x) #define DPRINTFN(n,x) #endif #define UAUDIO_NCHANBUFS 6 /* number of outstanding request */ +#if defined(__NetBSD__) || defined(__OpenBSD__) +#define UAUDIO_NFRAMES 10 /* ms of sound in each request */ +#elif defined(__FreeBSD__) #define UAUDIO_NFRAMES 20 /* ms of sound in each request */ +#endif #define MIX_MAX_CHAN 8 @@ -112,6 +136,7 @@ struct mixerctl { #define MIX_SIGNED_16 2 #define MIX_UNSIGNED_16 3 #define MIX_SIGNED_8 4 +#define MIX_SELECTOR 5 #define MIX_SIZE(n) ((n) == MIX_SIGNED_16 || (n) == MIX_UNSIGNED_16 ? 2 : 1) #define MIX_UNSIGNED(n) ((n) == MIX_UNSIGNED_16) int minval, maxval; @@ -130,22 +155,26 @@ struct mixerctl { struct as_info { u_int8_t alt; u_int8_t encoding; + u_int8_t attributes; /* Copy of bmAttributes of + * usb_audio_streaming_endpoint_descriptor + */ usbd_interface_handle ifaceh; - usb_interface_descriptor_t *idesc; - usb_endpoint_descriptor_audio_t *edesc; - struct usb_audio_streaming_type1_descriptor *asf1desc; + const usb_interface_descriptor_t *idesc; + const usb_endpoint_descriptor_audio_t *edesc; + const usb_endpoint_descriptor_audio_t *edesc1; + const struct usb_audio_streaming_type1_descriptor *asf1desc; + int sc_busy; /* currently used */ }; struct chan { - int terminal; /* terminal id */ #if defined(__NetBSD__) || defined(__OpenBSD__) - void (*intr)(void *); /* dma completion intr handler */ + void (*intr)(void *); /* DMA completion intr handler */ void *arg; /* arg for intr() */ #else struct pcm_channel *pcm_ch; #endif usbd_pipe_handle pipe; - int dir; /* direction */ + usbd_pipe_handle sync_pipe; u_int sample_size; u_int sample_rate; @@ -159,15 +188,16 @@ struct chan { int blksize; /* chunk size to report up */ int transferred; /* transferred bytes not reported up */ - char nofrac; /* don't do sample rate adjustment */ + int altidx; /* currently used altidx */ int curchanbuf; struct chanbuf { - struct chan *chan; + struct chan *chan; usbd_xfer_handle xfer; - u_char *buffer; - u_int16_t sizes[UAUDIO_NFRAMES]; - u_int16_t size; + u_char *buffer; + u_int16_t sizes[UAUDIO_NFRAMES]; + u_int16_t offsets[UAUDIO_NFRAMES]; + u_int16_t size; } chanbufs[UAUDIO_NCHANBUFS]; struct uaudio_softc *sc; /* our softc */ @@ -179,151 +209,194 @@ struct chan { }; struct uaudio_softc { - USBBASEDEVICE sc_dev; /* base device */ + USBBASEDEVICE sc_dev; /* base device */ usbd_device_handle sc_udev; /* USB device */ - - char sc_dead; /* The device is dead -- kill it */ - - int sc_ac_iface; /* Audio Control interface */ + int sc_ac_iface; /* Audio Control interface */ usbd_interface_handle sc_ac_ifaceh; + struct chan sc_playchan; /* play channel */ + struct chan sc_recchan; /* record channel */ + int sc_nullalt; + int sc_audio_rev; + struct as_info *sc_alts; /* alternate settings */ + int sc_nalts; /* # of alternate settings */ + int sc_altflags; +#define HAS_8 0x01 +#define HAS_16 0x02 +#define HAS_8U 0x04 +#define HAS_ALAW 0x08 +#define HAS_MULAW 0x10 +#define UA_NOFRAC 0x20 /* don't do sample rate adjustment */ +#define HAS_24 0x40 + int sc_mode; /* play/record capability */ + struct mixerctl *sc_ctls; /* mixer controls */ + int sc_nctls; /* # of mixer controls */ + device_ptr_t sc_audiodev; + char sc_dying; +}; - struct chan sc_chan; - - int sc_curaltidx; - - int sc_nullalt; - - int sc_audio_rev; - - struct as_info *sc_alts; - int sc_nalts; - int sc_props; - - int sc_altflags; -#define HAS_8 0x01 -#define HAS_16 0x02 -#define HAS_8U 0x04 -#define HAS_ALAW 0x08 -#define HAS_MULAW 0x10 - - struct mixerctl *sc_ctls; - int sc_nctls; +struct terminal_list { + int size; + uint16_t terminals[1]; +}; +#define TERMINAL_LIST_SIZE(N) (offsetof(struct terminal_list, terminals) \ + + sizeof(uint16_t) * (N)) - device_ptr_t sc_audiodev; - char sc_dying; +struct io_terminal { + union { + const usb_descriptor_t *desc; + const struct usb_audio_input_terminal *it; + const struct usb_audio_output_terminal *ot; + const struct usb_audio_mixer_unit *mu; + const struct usb_audio_selector_unit *su; + const struct usb_audio_feature_unit *fu; + const struct usb_audio_processing_unit *pu; + const struct usb_audio_extension_unit *eu; + } d; + int inputs_size; + struct terminal_list **inputs; /* list of source input terminals */ + struct terminal_list *output; /* list of destination output terminals */ + int direct; /* directly connected to an output terminal */ }; -#define UAC_OUTPUT 0 -#define UAC_INPUT 1 -#define UAC_EQUAL 2 +#define UAC_OUTPUT 0 +#define UAC_INPUT 1 +#define UAC_EQUAL 2 +#define UAC_RECORD 3 +#define UAC_NCLASSES 4 +#if !defined(__FreeBSD__) +#ifdef USB_DEBUG +Static const char *uac_names[] = { + AudioCoutputs, AudioCinputs, AudioCequalization, AudioCrecord, +}; +#endif +#endif -Static usbd_status uaudio_identify_ac(struct uaudio_softc *sc, - usb_config_descriptor_t *cdesc); -Static usbd_status uaudio_identify_as(struct uaudio_softc *sc, - usb_config_descriptor_t *cdesc); -Static usbd_status uaudio_process_as(struct uaudio_softc *sc, - char *buf, int *offsp, int size, - usb_interface_descriptor_t *id); +Static usbd_status uaudio_identify_ac + (struct uaudio_softc *, const usb_config_descriptor_t *); +Static usbd_status uaudio_identify_as + (struct uaudio_softc *, const usb_config_descriptor_t *); +Static usbd_status uaudio_process_as + (struct uaudio_softc *, const char *, int *, int, + const usb_interface_descriptor_t *); -Static void uaudio_add_alt(struct uaudio_softc *sc, - struct as_info *ai); +Static void uaudio_add_alt(struct uaudio_softc *, const struct as_info *); -Static usb_interface_descriptor_t *uaudio_find_iface(char *buf, - int size, int *offsp, int subtype); +Static const usb_interface_descriptor_t *uaudio_find_iface + (const char *, int, int *, int); -Static void uaudio_mixer_add_ctl(struct uaudio_softc *sc, - struct mixerctl *mp); +Static void uaudio_mixer_add_ctl(struct uaudio_softc *, struct mixerctl *); #if defined(__NetBSD__) || defined(__OpenBSD__) -Static char *uaudio_id_name(struct uaudio_softc *sc, - usb_descriptor_t **dps, int id); +Static char *uaudio_id_name + (struct uaudio_softc *, const struct io_terminal *, int); #endif -Static struct usb_audio_cluster uaudio_get_cluster(int id, - usb_descriptor_t **dps); -Static void uaudio_add_input(struct uaudio_softc *sc, - usb_descriptor_t *v, usb_descriptor_t **dps); -Static void uaudio_add_output(struct uaudio_softc *sc, - usb_descriptor_t *v, usb_descriptor_t **dps); -Static void uaudio_add_mixer(struct uaudio_softc *sc, - usb_descriptor_t *v, usb_descriptor_t **dps); -Static void uaudio_add_selector(struct uaudio_softc *sc, - usb_descriptor_t *v, usb_descriptor_t **dps); -Static void uaudio_add_feature(struct uaudio_softc *sc, - usb_descriptor_t *v, usb_descriptor_t **dps); -Static void uaudio_add_processing_updown(struct uaudio_softc *sc, - usb_descriptor_t *v, usb_descriptor_t **dps); -Static void uaudio_add_processing(struct uaudio_softc *sc, - usb_descriptor_t *v, usb_descriptor_t **dps); -Static void uaudio_add_extension(struct uaudio_softc *sc, - usb_descriptor_t *v, usb_descriptor_t **dps); -Static usbd_status uaudio_identify(struct uaudio_softc *sc, - usb_config_descriptor_t *cdesc); +#ifdef USB_DEBUG +Static void uaudio_dump_cluster(const struct usb_audio_cluster *); +#endif +Static struct usb_audio_cluster uaudio_get_cluster + (int, const struct io_terminal *); +Static void uaudio_add_input + (struct uaudio_softc *, const struct io_terminal *, int); +Static void uaudio_add_output + (struct uaudio_softc *, const struct io_terminal *, int); +Static void uaudio_add_mixer + (struct uaudio_softc *, const struct io_terminal *, int); +Static void uaudio_add_selector + (struct uaudio_softc *, const struct io_terminal *, int); +#ifdef USB_DEBUG +Static const char *uaudio_get_terminal_name(int); +#endif +#if !defined(__FreeBSD__) +Static int uaudio_determine_class + (const struct io_terminal *, struct mixerctl *); +Static const char *uaudio_feature_name + (const struct io_terminal *, struct mixerctl *); +#endif +Static void uaudio_add_feature + (struct uaudio_softc *, const struct io_terminal *, int); +Static void uaudio_add_processing_updown + (struct uaudio_softc *, const struct io_terminal *, int); +Static void uaudio_add_processing + (struct uaudio_softc *, const struct io_terminal *, int); +Static void uaudio_add_extension + (struct uaudio_softc *, const struct io_terminal *, int); +Static struct terminal_list *uaudio_merge_terminal_list + (const struct io_terminal *); +Static struct terminal_list *uaudio_io_terminaltype + (int, struct io_terminal *, int); +Static usbd_status uaudio_identify + (struct uaudio_softc *, const usb_config_descriptor_t *); -Static int uaudio_signext(int type, int val); +Static int uaudio_signext(int, int); #if defined(__NetBSD__) || defined(__OpenBSD__) -Static int uaudio_value2bsd(struct mixerctl *mc, int val); +Static int uaudio_value2bsd(struct mixerctl *, int); #endif -Static int uaudio_bsd2value(struct mixerctl *mc, int val); -Static int uaudio_get(struct uaudio_softc *sc, int type, - int which, int wValue, int wIndex, int len); +Static int uaudio_bsd2value(struct mixerctl *, int); +Static int uaudio_get(struct uaudio_softc *, int, int, int, int, int); #if defined(__NetBSD__) || defined(__OpenBSD__) -Static int uaudio_ctl_get(struct uaudio_softc *sc, int which, - struct mixerctl *mc, int chan); +Static int uaudio_ctl_get + (struct uaudio_softc *, int, struct mixerctl *, int); #endif -Static void uaudio_set(struct uaudio_softc *sc, int type, - int which, int wValue, int wIndex, int l, int v); -Static void uaudio_ctl_set(struct uaudio_softc *sc, int which, - struct mixerctl *mc, int chan, int val); +Static void uaudio_set + (struct uaudio_softc *, int, int, int, int, int, int); +Static void uaudio_ctl_set + (struct uaudio_softc *, int, struct mixerctl *, int, int); -Static usbd_status uaudio_set_speed(struct uaudio_softc *, int, u_int); +Static usbd_status uaudio_set_speed(struct uaudio_softc *, int, u_int); -Static usbd_status uaudio_chan_open(struct uaudio_softc *sc, - struct chan *ch); -Static void uaudio_chan_close(struct uaudio_softc *sc, - struct chan *ch); -Static usbd_status uaudio_chan_alloc_buffers(struct uaudio_softc *, - struct chan *); -Static void uaudio_chan_free_buffers(struct uaudio_softc *, - struct chan *); +Static usbd_status uaudio_chan_open(struct uaudio_softc *, struct chan *); +Static void uaudio_chan_close(struct uaudio_softc *, struct chan *); +Static usbd_status uaudio_chan_alloc_buffers + (struct uaudio_softc *, struct chan *); +Static void uaudio_chan_free_buffers(struct uaudio_softc *, struct chan *); #if defined(__NetBSD__) || defined(__OpenBSD__) -Static void uaudio_chan_set_param(struct chan *ch, - struct audio_params *param, u_char *start, - u_char *end, int blksize); +Static void uaudio_chan_init + (struct chan *, int, const struct audio_params *, int); +Static void uaudio_chan_set_param(struct chan *, u_char *, u_char *, int); #endif -Static void uaudio_chan_ptransfer(struct chan *ch); -Static void uaudio_chan_pintr(usbd_xfer_handle xfer, - usbd_private_handle priv, usbd_status status); +Static void uaudio_chan_ptransfer(struct chan *); +Static void uaudio_chan_pintr + (usbd_xfer_handle, usbd_private_handle, usbd_status); -Static void uaudio_chan_rtransfer(struct chan *ch); -Static void uaudio_chan_rintr(usbd_xfer_handle xfer, - usbd_private_handle priv, usbd_status status); +Static void uaudio_chan_rtransfer(struct chan *); +Static void uaudio_chan_rintr + (usbd_xfer_handle, usbd_private_handle, usbd_status); #if defined(__NetBSD__) || defined(__OpenBSD__) -Static int uaudio_open(void *, int); -Static void uaudio_close(void *); -Static int uaudio_drain(void *); -Static int uaudio_query_encoding(void *, struct audio_encoding *); -Static int uaudio_set_params(void *, int, int, - struct audio_params *, struct audio_params *); -Static int uaudio_round_blocksize(void *, int); -Static int uaudio_trigger_output(void *, void *, void *, - int, void (*)(void *), void *, - struct audio_params *); -Static int uaudio_trigger_input (void *, void *, void *, - int, void (*)(void *), void *, - struct audio_params *); -Static int uaudio_halt_in_dma(void *); -Static int uaudio_halt_out_dma(void *); -Static int uaudio_getdev(void *, struct audio_device *); -Static int uaudio_mixer_set_port(void *, mixer_ctrl_t *); -Static int uaudio_mixer_get_port(void *, mixer_ctrl_t *); -Static int uaudio_query_devinfo(void *, mixer_devinfo_t *); -Static int uaudio_get_props(void *); +Static int uaudio_open(void *, int); +Static void uaudio_close(void *); +Static int uaudio_drain(void *); +Static int uaudio_query_encoding(void *, struct audio_encoding *); +Static void uaudio_get_minmax_rates + (int, const struct as_info *, const struct audio_params *, + int, u_long *, u_long *); +Static int uaudio_match_alt_sub + (int, const struct as_info *, const struct audio_params *, int, u_long); +Static int uaudio_match_alt_chan + (int, const struct as_info *, struct audio_params *, int); +Static int uaudio_match_alt + (int, const struct as_info *, struct audio_params *, int); +Static int uaudio_set_params + (void *, int, int, struct audio_params *, struct audio_params *); +Static int uaudio_round_blocksize(void *, int); +Static int uaudio_trigger_output + (void *, void *, void *, int, void (*)(void *), void *, + struct audio_params *); +Static int uaudio_trigger_input + (void *, void *, void *, int, void (*)(void *), void *, + struct audio_params *); +Static int uaudio_halt_in_dma(void *); +Static int uaudio_halt_out_dma(void *); +Static int uaudio_getdev(void *, struct audio_device *); +Static int uaudio_mixer_set_port(void *, mixer_ctrl_t *); +Static int uaudio_mixer_get_port(void *, mixer_ctrl_t *); +Static int uaudio_query_devinfo(void *, mixer_devinfo_t *); +Static int uaudio_get_props(void *); -Static struct audio_hw_if uaudio_hw_if = { +Static const struct audio_hw_if uaudio_hw_if = { uaudio_open, uaudio_close, uaudio_drain, @@ -350,6 +423,7 @@ Static struct audio_hw_if uaudio_hw_if = uaudio_get_props, uaudio_trigger_output, uaudio_trigger_input, + NULL, }; Static struct audio_device uaudio_device = { @@ -360,7 +434,7 @@ Static struct audio_device uaudio_device #elif defined(__FreeBSD__) Static int audio_attach_mi(device_t); -Static void uaudio_init_params(struct uaudio_softc * sc, struct chan *ch); +Static int uaudio_init_params(struct uaudio_softc * sc, struct chan *ch, int mode); /* for NetBSD compatibirity */ #define AUMODE_PLAY 0x01 @@ -397,13 +471,13 @@ USB_MATCH(uaudio) { USB_MATCH_START(uaudio, uaa); usb_interface_descriptor_t *id; - + if (uaa->iface == NULL) return (UMATCH_NONE); id = usbd_get_interface_descriptor(uaa->iface); /* Trigger on the control interface. */ - if (id == NULL || + if (id == NULL || id->bInterfaceClass != UICLASS_AUDIO || id->bInterfaceSubClass != UISUBCLASS_AUDIOCONTROL || (usbd_get_quirks(uaa->device)->uq_flags & UQ_BAD_AUDIO)) @@ -421,8 +495,12 @@ USB_ATTACH(uaudio) usbd_status err; int i, j, found; +#if defined(__FreeBSD__) usbd_devinfo(uaa->device, 0, devinfo); USB_ATTACH_SETUP; +#else + usbd_devinfo(uaa->device, 0, devinfo, sizeof(devinfo)); +#endif #if !defined(__FreeBSD__) printf(": %s\n", devinfo); @@ -475,10 +553,12 @@ USB_ATTACH(uaudio) printf("%s: audio rev %d.%02x\n", USBDEVNAME(sc->sc_dev), sc->sc_audio_rev >> 8, sc->sc_audio_rev & 0xff); - sc->sc_chan.sc = sc; + sc->sc_playchan.sc = sc->sc_recchan.sc = sc; + sc->sc_playchan.altidx = -1; + sc->sc_recchan.altidx = -1; if (usbd_get_quirks(sc->sc_udev)->uq_flags & UQ_AU_NO_FRAC) - sc->sc_chan.nofrac = 1; + sc->sc_altflags |= UA_NOFRAC; #ifndef USB_DEBUG if (bootverbose) @@ -566,7 +646,7 @@ USB_DETACH(uaudio) #endif #if defined(__NetBSD__) || defined(__OpenBSD__) -int +Static int uaudio_query_encoding(void *addr, struct audio_encoding *fp) { struct uaudio_softc *sc = addr; @@ -575,56 +655,56 @@ uaudio_query_encoding(void *addr, struct if (sc->sc_dying) return (EIO); - + if (sc->sc_nalts == 0 || flags == 0) return (ENXIO); idx = fp->index; switch (idx) { case 0: - strcpy(fp->name, AudioEulinear); + strlcpy(fp->name, AudioEulinear, sizeof(fp->name)); fp->encoding = AUDIO_ENCODING_ULINEAR; fp->precision = 8; fp->flags = flags&HAS_8U ? 0 : AUDIO_ENCODINGFLAG_EMULATED; return (0); case 1: - strcpy(fp->name, AudioEmulaw); + strlcpy(fp->name, AudioEmulaw, sizeof(fp->name)); fp->encoding = AUDIO_ENCODING_ULAW; fp->precision = 8; fp->flags = flags&HAS_MULAW ? 0 : AUDIO_ENCODINGFLAG_EMULATED; return (0); case 2: - strcpy(fp->name, AudioEalaw); + strlcpy(fp->name, AudioEalaw, sizeof(fp->name)); fp->encoding = AUDIO_ENCODING_ALAW; fp->precision = 8; fp->flags = flags&HAS_ALAW ? 0 : AUDIO_ENCODINGFLAG_EMULATED; return (0); case 3: - strcpy(fp->name, AudioEslinear); + strlcpy(fp->name, AudioEslinear, sizeof(fp->name)); fp->encoding = AUDIO_ENCODING_SLINEAR; fp->precision = 8; fp->flags = flags&HAS_8 ? 0 : AUDIO_ENCODINGFLAG_EMULATED; return (0); - case 4: - strcpy(fp->name, AudioEslinear_le); + case 4: + strlcpy(fp->name, AudioEslinear_le, sizeof(fp->name)); fp->encoding = AUDIO_ENCODING_SLINEAR_LE; fp->precision = 16; fp->flags = 0; return (0); case 5: - strcpy(fp->name, AudioEulinear_le); + strlcpy(fp->name, AudioEulinear_le, sizeof(fp->name)); fp->encoding = AUDIO_ENCODING_ULINEAR_LE; fp->precision = 16; fp->flags = AUDIO_ENCODINGFLAG_EMULATED; return (0); case 6: - strcpy(fp->name, AudioEslinear_be); + strlcpy(fp->name, AudioEslinear_be, sizeof(fp->name)); fp->encoding = AUDIO_ENCODING_SLINEAR_BE; fp->precision = 16; fp->flags = AUDIO_ENCODINGFLAG_EMULATED; return (0); case 7: - strcpy(fp->name, AudioEulinear_be); + strlcpy(fp->name, AudioEulinear_be, sizeof(fp->name)); fp->encoding = AUDIO_ENCODING_ULINEAR_BE; fp->precision = 16; fp->flags = AUDIO_ENCODINGFLAG_EMULATED; @@ -635,13 +715,13 @@ uaudio_query_encoding(void *addr, struct } #endif -usb_interface_descriptor_t * -uaudio_find_iface(char *buf, int size, int *offsp, int subtype) +Static const usb_interface_descriptor_t * +uaudio_find_iface(const char *buf, int size, int *offsp, int subtype) { - usb_interface_descriptor_t *d; + const usb_interface_descriptor_t *d; while (*offsp < size) { - d = (void *)(buf + *offsp); + d = (const void *)(buf + *offsp); *offsp += d->bLength; if (d->bDescriptorType == UDESC_INTERFACE && d->bInterfaceClass == UICLASS_AUDIO && @@ -651,29 +731,47 @@ uaudio_find_iface(char *buf, int size, i return (NULL); } -void +Static void uaudio_mixer_add_ctl(struct uaudio_softc *sc, struct mixerctl *mc) { int res; - size_t len = sizeof(*mc) * (sc->sc_nctls + 1); - struct mixerctl *nmc = sc->sc_nctls == 0 ? - malloc(len, M_USBDEV, M_NOWAIT) : - realloc(sc->sc_ctls, len, M_USBDEV, M_NOWAIT); + size_t len; + struct mixerctl *nmc; - if(nmc == NULL){ +#if !defined(__FreeBSD__) + if (mc->class < UAC_NCLASSES) { + DPRINTF(("%s: adding %s.%s\n", + __func__, uac_names[mc->class], mc->ctlname)); + } else { + DPRINTF(("%s: adding %s\n", __func__, mc->ctlname)); + } +#endif + len = sizeof(*mc) * (sc->sc_nctls + 1); + nmc = malloc(len, M_USBDEV, M_NOWAIT); + if (nmc == NULL) { printf("uaudio_mixer_add_ctl: no memory\n"); return; } + /* Copy old data, if there was any */ + if (sc->sc_nctls != 0) { + memcpy(nmc, sc->sc_ctls, sizeof(*mc) * (sc->sc_nctls)); + free(sc->sc_ctls, M_USBDEV); + } sc->sc_ctls = nmc; mc->delta = 0; - if (mc->type != MIX_ON_OFF) { + if (mc->type == MIX_ON_OFF) { + mc->minval = 0; + mc->maxval = 1; + } else if (mc->type == MIX_SELECTOR) { + ; + } else { /* Determine min and max values. */ - mc->minval = uaudio_signext(mc->type, - uaudio_get(sc, GET_MIN, UT_READ_CLASS_INTERFACE, - mc->wValue[0], mc->wIndex, + mc->minval = uaudio_signext(mc->type, + uaudio_get(sc, GET_MIN, UT_READ_CLASS_INTERFACE, + mc->wValue[0], mc->wIndex, MIX_SIZE(mc->type))); - mc->maxval = 1 + uaudio_signext(mc->type, + mc->maxval = 1 + uaudio_signext(mc->type, uaudio_get(sc, GET_MAX, UT_READ_CLASS_INTERFACE, mc->wValue[0], mc->wIndex, MIX_SIZE(mc->type))); @@ -684,10 +782,7 @@ uaudio_mixer_add_ctl(struct uaudio_softc mc->wValue[0], mc->wIndex, MIX_SIZE(mc->type)); if (res > 0) - mc->delta = (res * 256 + mc->mul/2) / mc->mul; - } else { - mc->minval = 0; - mc->maxval = 1; + mc->delta = (res * 255 + mc->mul/2) / mc->mul; } sc->sc_ctls[sc->sc_nctls++] = *mc; @@ -714,67 +809,80 @@ uaudio_mixer_add_ctl(struct uaudio_softc } #if defined(__NetBSD__) || defined(__OpenBSD__) -char * -uaudio_id_name(struct uaudio_softc *sc, usb_descriptor_t **dps, int id) +Static char * +uaudio_id_name(struct uaudio_softc *sc, const struct io_terminal *iot, int id) { static char buf[32]; - sprintf(buf, "i%d", id); + snprintf(buf, sizeof(buf), "i%d", id); return (buf); } #endif -struct usb_audio_cluster -uaudio_get_cluster(int id, usb_descriptor_t **dps) +#ifdef USB_DEBUG +Static void +uaudio_dump_cluster(const struct usb_audio_cluster *cl) +{ + static const char *channel_names[16] = { + "LEFT", "RIGHT", "CENTER", "LFE", + "LEFT_SURROUND", "RIGHT_SURROUND", "LEFT_CENTER", "RIGHT_CENTER", + "SURROUND", "LEFT_SIDE", "RIGHT_SIDE", "TOP", + "RESERVED12", "RESERVED13", "RESERVED14", "RESERVED15", + }; + int cc, i, first; + + cc = UGETW(cl->wChannelConfig); + logprintf("cluster: bNrChannels=%u wChannelConfig=0x%.4x", + cl->bNrChannels, cc); + first = TRUE; + for (i = 0; cc != 0; i++) { + if (cc & 1) { + logprintf("%c%s", first ? '<' : ',', channel_names[i]); + first = FALSE; + } + cc = cc >> 1; + } + logprintf("> iChannelNames=%u", cl->iChannelNames); +} +#endif + +Static struct usb_audio_cluster +uaudio_get_cluster(int id, const struct io_terminal *iot) { struct usb_audio_cluster r; - usb_descriptor_t *dp; + const usb_descriptor_t *dp; int i; for (i = 0; i < 25; i++) { /* avoid infinite loops */ - dp = dps[id]; + dp = iot[id].d.desc; if (dp == 0) goto bad; switch (dp->bDescriptorSubtype) { case UDESCSUB_AC_INPUT: -#define p ((struct usb_audio_input_terminal *)dp) - r.bNrChannels = p->bNrChannels; - USETW(r.wChannelConfig, UGETW(p->wChannelConfig)); - r.iChannelNames = p->iChannelNames; -#undef p + r.bNrChannels = iot[id].d.it->bNrChannels; + USETW(r.wChannelConfig, UGETW(iot[id].d.it->wChannelConfig)); + r.iChannelNames = iot[id].d.it->iChannelNames; return (r); case UDESCSUB_AC_OUTPUT: -#define p ((struct usb_audio_output_terminal *)dp) - id = p->bSourceId; -#undef p + id = iot[id].d.ot->bSourceId; break; case UDESCSUB_AC_MIXER: -#define p ((struct usb_audio_mixer_unit *)dp) - r = *(struct usb_audio_cluster *) - &p->baSourceId[p->bNrInPins]; -#undef p + r = *(const struct usb_audio_cluster *) + &iot[id].d.mu->baSourceId[iot[id].d.mu->bNrInPins]; return (r); case UDESCSUB_AC_SELECTOR: /* XXX This is not really right */ -#define p ((struct usb_audio_selector_unit *)dp) - id = p->baSourceId[0]; -#undef p + id = iot[id].d.su->baSourceId[0]; break; case UDESCSUB_AC_FEATURE: -#define p ((struct usb_audio_feature_unit *)dp) - id = p->bSourceId; -#undef p + id = iot[id].d.fu->bSourceId; break; case UDESCSUB_AC_PROCESSING: -#define p ((struct usb_audio_processing_unit *)dp) - r = *(struct usb_audio_cluster *) - &p->baSourceId[p->bNrInPins]; -#undef p + r = *(const struct usb_audio_cluster *) + &iot[id].d.pu->baSourceId[iot[id].d.pu->bNrInPins]; return (r); case UDESCSUB_AC_EXTENSION: -#define p ((struct usb_audio_extension_unit *)dp) - r = *(struct usb_audio_cluster *) - &p->baSourceId[p->bNrInPins]; -#undef p + r = *(const struct usb_audio_cluster *) + &iot[id].d.eu->baSourceId[iot[id].d.eu->bNrInPins]; return (r); default: goto bad; @@ -787,13 +895,11 @@ uaudio_get_cluster(int id, usb_descripto } -void -uaudio_add_input(struct uaudio_softc *sc, usb_descriptor_t *v, - usb_descriptor_t **dps) +Static void +uaudio_add_input(struct uaudio_softc *sc, const struct io_terminal *iot, int id) { #ifdef USB_DEBUG - struct usb_audio_input_terminal *d = - (struct usb_audio_input_terminal *)v; + const struct usb_audio_input_terminal *d = iot[id].d.it; DPRINTFN(2,("uaudio_add_input: bTerminalId=%d wTerminalType=0x%04x " "bAssocTerminal=%d bNrChannels=%d wChannelConfig=%d " @@ -804,13 +910,11 @@ uaudio_add_input(struct uaudio_softc *sc #endif } -void -uaudio_add_output(struct uaudio_softc *sc, usb_descriptor_t *v, - usb_descriptor_t **dps) +Static void +uaudio_add_output(struct uaudio_softc *sc, const struct io_terminal *iot, int id) { #ifdef USB_DEBUG - struct usb_audio_output_terminal *d = - (struct usb_audio_output_terminal *)v; + const struct usb_audio_output_terminal *d = iot[id].d.ot; DPRINTFN(2,("uaudio_add_output: bTerminalId=%d wTerminalType=0x%04x " "bAssocTerminal=%d bSourceId=%d iTerminal=%d\n", @@ -819,33 +923,32 @@ uaudio_add_output(struct uaudio_softc *s #endif } -void -uaudio_add_mixer(struct uaudio_softc *sc, usb_descriptor_t *v, - usb_descriptor_t **dps) +Static void +uaudio_add_mixer(struct uaudio_softc *sc, const struct io_terminal *iot, int id) { - struct usb_audio_mixer_unit *d = (struct usb_audio_mixer_unit *)v; - struct usb_audio_mixer_unit_1 *d1; + const struct usb_audio_mixer_unit *d = iot[id].d.mu; + const struct usb_audio_mixer_unit_1 *d1; int c, chs, ichs, ochs, i, o, bno, p, mo, mc, k; - uByte *bm; + const uByte *bm; struct mixerctl mix; DPRINTFN(2,("uaudio_add_mixer: bUnitId=%d bNrInPins=%d\n", d->bUnitId, d->bNrInPins)); - + /* Compute the number of input channels */ ichs = 0; for (i = 0; i < d->bNrInPins; i++) - ichs += uaudio_get_cluster(d->baSourceId[i], dps).bNrChannels; + ichs += uaudio_get_cluster(d->baSourceId[i], iot).bNrChannels; /* and the number of output channels */ - d1 = (struct usb_audio_mixer_unit_1 *)&d->baSourceId[d->bNrInPins]; + d1 = (const struct usb_audio_mixer_unit_1 *)&d->baSourceId[d->bNrInPins]; ochs = d1->bNrChannels; DPRINTFN(2,("uaudio_add_mixer: ichs=%d ochs=%d\n", ichs, ochs)); bm = d1->bmControls; mix.wIndex = MAKE(d->bUnitId, sc->sc_ac_iface); #if !defined(__FreeBSD__) - mix.class = -1; + uaudio_determine_class(&iot[id], &mix); #endif mix.type = MIX_SIGNED_16; #if !defined(__FreeBSD__) /* XXXXX */ @@ -854,7 +957,7 @@ uaudio_add_mixer(struct uaudio_softc *sc #define BIT(bno) ((bm[bno / 8] >> (7 - bno % 8)) & 1) for (p = i = 0; i < d->bNrInPins; i++) { - chs = uaudio_get_cluster(d->baSourceId[i], dps).bNrChannels; + chs = uaudio_get_cluster(d->baSourceId[i], iot).bNrChannels; mc = 0; for (c = 0; c < chs; c++) { mo = 0; @@ -872,12 +975,13 @@ uaudio_add_mixer(struct uaudio_softc *sc for (o = 0; o < ochs; o++) { bno = (p + c) * ochs + o; if (BIT(bno)) - mix.wValue[k++] = + mix.wValue[k++] = MAKE(p+c+1, o+1); } #if !defined(__FreeBSD__) - sprintf(mix.ctlname, "mix%d-%s", d->bUnitId, - uaudio_id_name(sc, dps, d->baSourceId[i])); + snprintf(mix.ctlname, sizeof(mix.ctlname), "mix%d-%s", + d->bUnitId, uaudio_id_name(sc, iot, + d->baSourceId[i])); #endif mix.nchan = chs; uaudio_mixer_add_ctl(sc, &mix); @@ -890,34 +994,286 @@ uaudio_add_mixer(struct uaudio_softc *sc } -void -uaudio_add_selector(struct uaudio_softc *sc, usb_descriptor_t *v, - usb_descriptor_t **dps) +Static void +uaudio_add_selector(struct uaudio_softc *sc, const struct io_terminal *iot, int id) { -#ifdef USB_DEBUG - struct usb_audio_selector_unit *d = - (struct usb_audio_selector_unit *)v; +#if !defined(__FreeBSD__) || defined(USB_DEBUG) + const struct usb_audio_selector_unit *d = iot[id].d.su; +#endif +#if !defined(__FreeBSD__) + struct mixerctl mix; + int i, wp; +#endif DPRINTFN(2,("uaudio_add_selector: bUnitId=%d bNrInPins=%d\n", d->bUnitId, d->bNrInPins)); -#endif +#if defined(__FreeBSD__) printf("uaudio_add_selector: NOT IMPLEMENTED\n"); +#else + mix.wIndex = MAKE(d->bUnitId, sc->sc_ac_iface); + mix.wValue[0] = MAKE(0, 0); + uaudio_determine_class(&iot[id], &mix); + mix.nchan = 1; + mix.type = MIX_SELECTOR; + mix.ctlunit = ""; + mix.minval = 1; + mix.maxval = d->bNrInPins; + mix.mul = mix.maxval - mix.minval; + wp = snprintf(mix.ctlname, MAX_AUDIO_DEV_LEN, "sel%d-", d->bUnitId); + for (i = 1; i <= d->bNrInPins; i++) { + wp += snprintf(mix.ctlname + wp, MAX_AUDIO_DEV_LEN - wp, + "i%d", d->baSourceId[i - 1]); + if (wp > MAX_AUDIO_DEV_LEN - 1) + break; + } + uaudio_mixer_add_ctl(sc, &mix); +#endif } -void -uaudio_add_feature(struct uaudio_softc *sc, usb_descriptor_t *v, - usb_descriptor_t **dps) +#ifdef USB_DEBUG +Static const char * +uaudio_get_terminal_name(int terminal_type) { - struct usb_audio_feature_unit *d = (struct usb_audio_feature_unit *)v; + static char buf[100]; + + switch (terminal_type) { + /* USB terminal types */ + case UAT_UNDEFINED: return "UAT_UNDEFINED"; + case UAT_STREAM: return "UAT_STREAM"; + case UAT_VENDOR: return "UAT_VENDOR"; + /* input terminal types */ + case UATI_UNDEFINED: return "UATI_UNDEFINED"; + case UATI_MICROPHONE: return "UATI_MICROPHONE"; + case UATI_DESKMICROPHONE: return "UATI_DESKMICROPHONE"; + case UATI_PERSONALMICROPHONE: return "UATI_PERSONALMICROPHONE"; + case UATI_OMNIMICROPHONE: return "UATI_OMNIMICROPHONE"; + case UATI_MICROPHONEARRAY: return "UATI_MICROPHONEARRAY"; + case UATI_PROCMICROPHONEARR: return "UATI_PROCMICROPHONEARR"; + /* output terminal types */ + case UATO_UNDEFINED: return "UATO_UNDEFINED"; + case UATO_SPEAKER: return "UATO_SPEAKER"; + case UATO_HEADPHONES: return "UATO_HEADPHONES"; + case UATO_DISPLAYAUDIO: return "UATO_DISPLAYAUDIO"; + case UATO_DESKTOPSPEAKER: return "UATO_DESKTOPSPEAKER"; + case UATO_ROOMSPEAKER: return "UATO_ROOMSPEAKER"; + case UATO_COMMSPEAKER: return "UATO_COMMSPEAKER"; + case UATO_SUBWOOFER: return "UATO_SUBWOOFER"; + /* bidir terminal types */ + case UATB_UNDEFINED: return "UATB_UNDEFINED"; + case UATB_HANDSET: return "UATB_HANDSET"; + case UATB_HEADSET: return "UATB_HEADSET"; + case UATB_SPEAKERPHONE: return "UATB_SPEAKERPHONE"; + case UATB_SPEAKERPHONEESUP: return "UATB_SPEAKERPHONEESUP"; + case UATB_SPEAKERPHONEECANC: return "UATB_SPEAKERPHONEECANC"; + /* telephony terminal types */ + case UATT_UNDEFINED: return "UATT_UNDEFINED"; + case UATT_PHONELINE: return "UATT_PHONELINE"; + case UATT_TELEPHONE: return "UATT_TELEPHONE"; + case UATT_DOWNLINEPHONE: return "UATT_DOWNLINEPHONE"; + /* external terminal types */ + case UATE_UNDEFINED: return "UATE_UNDEFINED"; + case UATE_ANALOGCONN: return "UATE_ANALOGCONN"; + case UATE_LINECONN: return "UATE_LINECONN"; + case UATE_LEGACYCONN: return "UATE_LEGACYCONN"; + case UATE_DIGITALAUIFC: return "UATE_DIGITALAUIFC"; + case UATE_SPDIF: return "UATE_SPDIF"; + case UATE_1394DA: return "UATE_1394DA"; + case UATE_1394DV: return "UATE_1394DV"; + /* embedded function terminal types */ + case UATF_UNDEFINED: return "UATF_UNDEFINED"; + case UATF_CALIBNOISE: return "UATF_CALIBNOISE"; + case UATF_EQUNOISE: return "UATF_EQUNOISE"; + case UATF_CDPLAYER: return "UATF_CDPLAYER"; + case UATF_DAT: return "UATF_DAT"; + case UATF_DCC: return "UATF_DCC"; + case UATF_MINIDISK: return "UATF_MINIDISK"; + case UATF_ANALOGTAPE: return "UATF_ANALOGTAPE"; + case UATF_PHONOGRAPH: return "UATF_PHONOGRAPH"; + case UATF_VCRAUDIO: return "UATF_VCRAUDIO"; + case UATF_VIDEODISCAUDIO: return "UATF_VIDEODISCAUDIO"; + case UATF_DVDAUDIO: return "UATF_DVDAUDIO"; + case UATF_TVTUNERAUDIO: return "UATF_TVTUNERAUDIO"; + case UATF_SATELLITE: return "UATF_SATELLITE"; + case UATF_CABLETUNER: return "UATF_CABLETUNER"; + case UATF_DSS: return "UATF_DSS"; + case UATF_RADIORECV: return "UATF_RADIORECV"; + case UATF_RADIOXMIT: return "UATF_RADIOXMIT"; + case UATF_MULTITRACK: return "UATF_MULTITRACK"; + case UATF_SYNTHESIZER: return "UATF_SYNTHESIZER"; + default: + snprintf(buf, sizeof(buf), "unknown type (0x%.4x)", terminal_type); + return buf; + } +} +#endif + +#if !defined(__FreeBSD__) +Static int +uaudio_determine_class(const struct io_terminal *iot, struct mixerctl *mix) +{ + int terminal_type; + + if (iot == NULL || iot->output == NULL) { + mix->class = UAC_OUTPUT; + return 0; + } + terminal_type = 0; + if (iot->output->size == 1) + terminal_type = iot->output->terminals[0]; + /* + * If the only output terminal is USB, + * the class is UAC_RECORD. + */ + if ((terminal_type & 0xff00) == (UAT_UNDEFINED & 0xff00)) { + mix->class = UAC_RECORD; + if (iot->inputs_size == 1 + && iot->inputs[0] != NULL + && iot->inputs[0]->size == 1) + return iot->inputs[0]->terminals[0]; + else + return 0; + } + /* + * If the ultimate destination of the unit is just one output + * terminal and the unit is connected to the output terminal + * directly, the class is UAC_OUTPUT. + */ + if (terminal_type != 0 && iot->direct) { + mix->class = UAC_OUTPUT; + return terminal_type; + } + /* + * If the unit is connected to just one input terminal, + * the class is UAC_INPUT. + */ + if (iot->inputs_size == 1 && iot->inputs[0] != NULL + && iot->inputs[0]->size == 1) { + mix->class = UAC_INPUT; + return iot->inputs[0]->terminals[0]; + } + /* + * Otherwise, the class is UAC_OUTPUT. + */ + mix->class = UAC_OUTPUT; + return terminal_type; +} + +Static const char * +uaudio_feature_name(const struct io_terminal *iot, struct mixerctl *mix) +{ + int terminal_type; + + terminal_type = uaudio_determine_class(iot, mix); + if (mix->class == UAC_RECORD && terminal_type == 0) + return AudioNmixerout; + DPRINTF(("%s: terminal_type=%s\n", __func__, + uaudio_get_terminal_name(terminal_type))); + switch (terminal_type) { + case UAT_STREAM: + return AudioNdac; + + case UATI_MICROPHONE: + case UATI_DESKMICROPHONE: + case UATI_PERSONALMICROPHONE: + case UATI_OMNIMICROPHONE: + case UATI_MICROPHONEARRAY: + case UATI_PROCMICROPHONEARR: + return AudioNmicrophone; + + case UATO_SPEAKER: + case UATO_DESKTOPSPEAKER: + case UATO_ROOMSPEAKER: + case UATO_COMMSPEAKER: + return AudioNspeaker; + + case UATO_HEADPHONES: + return AudioNheadphone; + + case UATO_SUBWOOFER: + return AudioNlfe; + + /* telephony terminal types */ + case UATT_UNDEFINED: + case UATT_PHONELINE: + case UATT_TELEPHONE: + case UATT_DOWNLINEPHONE: + return "phone"; + + case UATE_ANALOGCONN: + case UATE_LINECONN: + case UATE_LEGACYCONN: + return AudioNline; + + case UATE_DIGITALAUIFC: + case UATE_SPDIF: + case UATE_1394DA: + case UATE_1394DV: + return AudioNaux; + + case UATF_CDPLAYER: + return AudioNcd; + + case UATF_SYNTHESIZER: + return AudioNfmsynth; + + case UATF_VIDEODISCAUDIO: + case UATF_DVDAUDIO: + case UATF_TVTUNERAUDIO: + return AudioNvideo; + + case UAT_UNDEFINED: + case UAT_VENDOR: + case UATI_UNDEFINED: +/* output terminal types */ + case UATO_UNDEFINED: + case UATO_DISPLAYAUDIO: +/* bidir terminal types */ + case UATB_UNDEFINED: + case UATB_HANDSET: + case UATB_HEADSET: + case UATB_SPEAKERPHONE: + case UATB_SPEAKERPHONEESUP: + case UATB_SPEAKERPHONEECANC: +/* external terminal types */ + case UATE_UNDEFINED: +/* embedded function terminal types */ + case UATF_UNDEFINED: + case UATF_CALIBNOISE: + case UATF_EQUNOISE: + case UATF_DAT: + case UATF_DCC: + case UATF_MINIDISK: + case UATF_ANALOGTAPE: + case UATF_PHONOGRAPH: + case UATF_VCRAUDIO: + case UATF_SATELLITE: + case UATF_CABLETUNER: + case UATF_DSS: + case UATF_RADIORECV: + case UATF_RADIOXMIT: + case UATF_MULTITRACK: + case 0xffff: + default: + DPRINTF(("%s: 'master' for 0x%.4x\n", __func__, terminal_type)); + return AudioNmaster; + } + return AudioNmaster; +} +#endif + +Static void +uaudio_add_feature(struct uaudio_softc *sc, const struct io_terminal *iot, int id) +{ + const struct usb_audio_feature_unit *d = iot[id].d.fu; uByte *ctls = d->bmaControls; int ctlsize = d->bControlSize; int nchan = (d->bLength - 7) / ctlsize; -#if !defined(__FreeBSD__) - int srcId = d->bSourceId; -#endif u_int fumask, mmask, cmask; struct mixerctl mix; int chan, ctl, i, unit; +#if !defined(__FreeBSD__) + const char *mixername; +#endif #define GET(i) (ctls[(i)*ctlsize] | \ (ctlsize > 1 ? ctls[(i)*ctlsize+1] << 8 : 0)) @@ -931,9 +1287,9 @@ uaudio_add_feature(struct uaudio_softc * } #if !defined(__FreeBSD__) - DPRINTFN(1,("uaudio_add_feature: bUnitId=%d bSourceId=%d, " - "%d channels, mmask=0x%04x, cmask=0x%04x\n", - d->bUnitId, srcId, nchan, mmask, cmask)); + DPRINTFN(1,("uaudio_add_feature: bUnitId=%d, " + "%d channels, mmask=0x%04x, cmask=0x%04x\n", + d->bUnitId, nchan, mmask, cmask)); #endif if (nchan > MIX_MAX_CHAN) @@ -961,7 +1317,7 @@ uaudio_add_feature(struct uaudio_softc * #undef GET #if !defined(__FreeBSD__) - mix.class = -1; /* XXX */ + mixername = uaudio_feature_name(&iot[id], &mix); #endif switch (ctl) { case MUTE_CONTROL: @@ -969,10 +1325,9 @@ uaudio_add_feature(struct uaudio_softc * #if defined(__FreeBSD__) mix.ctl = SOUND_MIXER_NRDEVICES; #else - sprintf(mix.ctlname, "fea%d-%s-%s", unit, - uaudio_id_name(sc, dps, srcId), - AudioNmute); mix.ctlunit = ""; + snprintf(mix.ctlname, sizeof(mix.ctlname), + "%s.%s", mixername, AudioNmute); #endif break; case VOLUME_CONTROL: @@ -981,10 +1336,8 @@ uaudio_add_feature(struct uaudio_softc * /* mix.ctl = SOUND_MIXER_VOLUME; */ mix.ctl = SOUND_MIXER_PCM; #else - sprintf(mix.ctlname, "fea%d-%s-%s", unit, - uaudio_id_name(sc, dps, srcId), - AudioNmaster); mix.ctlunit = AudioNvolume; + strlcpy(mix.ctlname, mixername, sizeof(mix.ctlname)); #endif break; case BASS_CONTROL: @@ -992,10 +1345,9 @@ uaudio_add_feature(struct uaudio_softc * #if defined(__FreeBSD__) mix.ctl = SOUND_MIXER_BASS; #else - sprintf(mix.ctlname, "fea%d-%s-%s", unit, - uaudio_id_name(sc, dps, srcId), - AudioNbass); mix.ctlunit = AudioNbass; + snprintf(mix.ctlname, sizeof(mix.ctlname), + "%s.%s", mixername, AudioNbass); #endif break; case MID_CONTROL: @@ -1003,10 +1355,9 @@ uaudio_add_feature(struct uaudio_softc * #if defined(__FreeBSD__) mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ #else - sprintf(mix.ctlname, "fea%d-%s-%s", unit, - uaudio_id_name(sc, dps, srcId), - AudioNmid); mix.ctlunit = AudioNmid; + snprintf(mix.ctlname, sizeof(mix.ctlname), + "%s.%s", mixername, AudioNmid); #endif break; case TREBLE_CONTROL: @@ -1014,10 +1365,9 @@ uaudio_add_feature(struct uaudio_softc * #if defined(__FreeBSD__) mix.ctl = SOUND_MIXER_TREBLE; #else - sprintf(mix.ctlname, "fea%d-%s-%s", unit, - uaudio_id_name(sc, dps, srcId), - AudioNtreble); mix.ctlunit = AudioNtreble; + snprintf(mix.ctlname, sizeof(mix.ctlname), + "%s.%s", mixername, AudioNtreble); #endif break; case GRAPHIC_EQUALIZER_CONTROL: @@ -1028,10 +1378,9 @@ uaudio_add_feature(struct uaudio_softc * #if defined(__FreeBSD__) mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ #else - sprintf(mix.ctlname, "fea%d-%s-%s", unit, - uaudio_id_name(sc, dps, srcId), - AudioNagc); mix.ctlunit = ""; + snprintf(mix.ctlname, sizeof(mix.ctlname), "%s.%s", + mixername, AudioNagc); #endif break; case DELAY_CONTROL: @@ -1039,10 +1388,9 @@ uaudio_add_feature(struct uaudio_softc * #if defined(__FreeBSD__) mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ #else - sprintf(mix.ctlname, "fea%d-%s-%s", unit, - uaudio_id_name(sc, dps, srcId), - AudioNdelay); mix.ctlunit = "4 ms"; + snprintf(mix.ctlname, sizeof(mix.ctlname), + "%s.%s", mixername, AudioNdelay); #endif break; case BASS_BOOST_CONTROL: @@ -1050,10 +1398,9 @@ uaudio_add_feature(struct uaudio_softc * #if defined(__FreeBSD__) mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */ #else - sprintf(mix.ctlname, "fea%d-%s-%s", unit, - uaudio_id_name(sc, dps, srcId), - AudioNbassboost); mix.ctlunit = ""; + snprintf(mix.ctlname, sizeof(mix.ctlname), + "%s.%s", mixername, AudioNbassboost); #endif break; case LOUDNESS_CONTROL: @@ -1061,10 +1408,9 @@ uaudio_add_feature(struct uaudio_softc * #if defined(__FreeBSD__) mix.ctl = SOUND_MIXER_LOUD; /* Is this correct ? */ #else - sprintf(mix.ctlname, "fea%d-%s-%s", unit, - uaudio_id_name(sc, dps, srcId), - AudioNloudness); mix.ctlunit = ""; + snprintf(mix.ctlname, sizeof(mix.ctlname), + "%s.%s", mixername, AudioNloudness); #endif break; } @@ -1072,16 +1418,15 @@ uaudio_add_feature(struct uaudio_softc * } } -void -uaudio_add_processing_updown(struct uaudio_softc *sc, usb_descriptor_t *v, - usb_descriptor_t **dps) +Static void +uaudio_add_processing_updown(struct uaudio_softc *sc, + const struct io_terminal *iot, int id) { - struct usb_audio_processing_unit *d = - (struct usb_audio_processing_unit *)v; - struct usb_audio_processing_unit_1 *d1 = - (struct usb_audio_processing_unit_1 *)&d->baSourceId[d->bNrInPins]; - struct usb_audio_processing_unit_updown *ud = - (struct usb_audio_processing_unit_updown *) + const struct usb_audio_processing_unit *d = iot[id].d.pu; + const struct usb_audio_processing_unit_1 *d1 = + (const struct usb_audio_processing_unit_1 *)&d->baSourceId[d->bNrInPins]; + const struct usb_audio_processing_unit_updown *ud = + (const struct usb_audio_processing_unit_updown *) &d1->bmControls[d1->bControlSize]; struct mixerctl mix; int i; @@ -1098,12 +1443,12 @@ uaudio_add_processing_updown(struct uaud mix.nchan = 1; mix.wValue[0] = MAKE(UD_MODE_SELECT_CONTROL, 0); #if !defined(__FreeBSD__) - mix.class = -1; + uaudio_determine_class(&iot[id], &mix); #endif mix.type = MIX_ON_OFF; /* XXX */ #if !defined(__FreeBSD__) mix.ctlunit = ""; - sprintf(mix.ctlname, "pro%d-mode", d->bUnitId); + snprintf(mix.ctlname, sizeof(mix.ctlname), "pro%d-mode", d->bUnitId); #endif for (i = 0; i < ud->bNrModes; i++) { @@ -1114,14 +1459,12 @@ uaudio_add_processing_updown(struct uaud uaudio_mixer_add_ctl(sc, &mix); } -void -uaudio_add_processing(struct uaudio_softc *sc, usb_descriptor_t *v, - usb_descriptor_t **dps) +Static void +uaudio_add_processing(struct uaudio_softc *sc, const struct io_terminal *iot, int id) { - struct usb_audio_processing_unit *d = - (struct usb_audio_processing_unit *)v; - struct usb_audio_processing_unit_1 *d1 = - (struct usb_audio_processing_unit_1 *)&d->baSourceId[d->bNrInPins]; + const struct usb_audio_processing_unit *d = iot[id].d.pu; + const struct usb_audio_processing_unit_1 *d1 = + (const struct usb_audio_processing_unit_1 *)&d->baSourceId[d->bNrInPins]; int ptype = UGETW(d->wProcessType); struct mixerctl mix; @@ -1133,19 +1476,20 @@ uaudio_add_processing(struct uaudio_soft mix.nchan = 1; mix.wValue[0] = MAKE(XX_ENABLE_CONTROL, 0); #if !defined(__FreeBSD__) - mix.class = -1; + uaudio_determine_class(&iot[id], &mix); #endif mix.type = MIX_ON_OFF; #if !defined(__FreeBSD__) mix.ctlunit = ""; - sprintf(mix.ctlname, "pro%d.%d-enable", d->bUnitId, ptype); + snprintf(mix.ctlname, sizeof(mix.ctlname), "pro%d.%d-enable", + d->bUnitId, ptype); #endif uaudio_mixer_add_ctl(sc, &mix); } switch(ptype) { case UPDOWNMIX_PROCESS: - uaudio_add_processing_updown(sc, v, dps); + uaudio_add_processing_updown(sc, iot, id); break; case DOLBY_PROLOGIC_PROCESS: case P3D_STEREO_EXTENDER_PROCESS: @@ -1161,14 +1505,12 @@ uaudio_add_processing(struct uaudio_soft } } -void -uaudio_add_extension(struct uaudio_softc *sc, usb_descriptor_t *v, - usb_descriptor_t **dps) +Static void +uaudio_add_extension(struct uaudio_softc *sc, const struct io_terminal *iot, int id) { - struct usb_audio_extension_unit *d = - (struct usb_audio_extension_unit *)v; - struct usb_audio_extension_unit_1 *d1 = - (struct usb_audio_extension_unit_1 *)&d->baSourceId[d->bNrInPins]; + const struct usb_audio_extension_unit *d = iot[id].d.eu; + const struct usb_audio_extension_unit_1 *d1 = + (const struct usb_audio_extension_unit_1 *)&d->baSourceId[d->bNrInPins]; struct mixerctl mix; DPRINTFN(2,("uaudio_add_extension: bUnitId=%d bNrInPins=%d\n", @@ -1182,19 +1524,206 @@ uaudio_add_extension(struct uaudio_softc mix.nchan = 1; mix.wValue[0] = MAKE(UA_EXT_ENABLE, 0); #if !defined(__FreeBSD__) - mix.class = -1; + uaudio_determine_class(&iot[id], &mix); #endif mix.type = MIX_ON_OFF; #if !defined(__FreeBSD__) mix.ctlunit = ""; - sprintf(mix.ctlname, "ext%d-enable", d->bUnitId); + snprintf(mix.ctlname, sizeof(mix.ctlname), "ext%d-enable", + d->bUnitId); #endif uaudio_mixer_add_ctl(sc, &mix); } } -usbd_status -uaudio_identify(struct uaudio_softc *sc, usb_config_descriptor_t *cdesc) +Static struct terminal_list* +uaudio_merge_terminal_list(const struct io_terminal *iot) +{ + struct terminal_list *tml; + uint16_t *ptm; + int i, len; + + len = 0; + if (iot->inputs == NULL) + return NULL; + for (i = 0; i < iot->inputs_size; i++) { + if (iot->inputs[i] != NULL) + len += iot->inputs[i]->size; + } + tml = malloc(TERMINAL_LIST_SIZE(len), M_TEMP, M_NOWAIT); + if (tml == NULL) { + printf("uaudio_merge_terminal_list: no memory\n"); + return NULL; + } + tml->size = 0; + ptm = tml->terminals; + for (i = 0; i < iot->inputs_size; i++) { + if (iot->inputs[i] == NULL) + continue; + if (iot->inputs[i]->size > len) + break; + memcpy(ptm, iot->inputs[i]->terminals, + iot->inputs[i]->size * sizeof(uint16_t)); + tml->size += iot->inputs[i]->size; + ptm += iot->inputs[i]->size; + len -= iot->inputs[i]->size; + } + return tml; +} + +Static struct terminal_list * +uaudio_io_terminaltype(int outtype, struct io_terminal *iot, int id) +{ + struct terminal_list *tml; + struct io_terminal *it; + int src_id, i; + + it = &iot[id]; + if (it->output != NULL) { + /* already has outtype? */ + for (i = 0; i < it->output->size; i++) + if (it->output->terminals[i] == outtype) + return uaudio_merge_terminal_list(it); + tml = malloc(TERMINAL_LIST_SIZE(it->output->size + 1), + M_TEMP, M_NOWAIT); + if (tml == NULL) { + printf("uaudio_io_terminaltype: no memory\n"); + return uaudio_merge_terminal_list(it); + } + memcpy(tml, it->output, TERMINAL_LIST_SIZE(it->output->size)); + tml->terminals[it->output->size] = outtype; + tml->size++; + free(it->output, M_TEMP); + it->output = tml; + if (it->inputs != NULL) { + for (i = 0; i < it->inputs_size; i++) + if (it->inputs[i] != NULL) + free(it->inputs[i], M_TEMP); + free(it->inputs, M_TEMP); + } + it->inputs_size = 0; + it->inputs = NULL; + } else { /* end `iot[id] != NULL' */ + it->inputs_size = 0; + it->inputs = NULL; + it->output = malloc(TERMINAL_LIST_SIZE(1), M_TEMP, M_NOWAIT); + if (it->output == NULL) { + printf("uaudio_io_terminaltype: no memory\n"); + return NULL; + } + it->output->terminals[0] = outtype; + it->output->size = 1; + it->direct = FALSE; + } + + switch (it->d.desc->bDescriptorSubtype) { + case UDESCSUB_AC_INPUT: + it->inputs = malloc(sizeof(struct terminal_list *), M_TEMP, M_NOWAIT); + if (it->inputs == NULL) { + printf("uaudio_io_terminaltype: no memory\n"); + return NULL; + } + tml = malloc(TERMINAL_LIST_SIZE(1), M_TEMP, M_NOWAIT); + if (tml == NULL) { + printf("uaudio_io_terminaltype: no memory\n"); + free(it->inputs, M_TEMP); + it->inputs = NULL; + return NULL; + } + it->inputs[0] = tml; + tml->terminals[0] = UGETW(it->d.it->wTerminalType); + tml->size = 1; + it->inputs_size = 1; + return uaudio_merge_terminal_list(it); + case UDESCSUB_AC_FEATURE: + src_id = it->d.fu->bSourceId; + it->inputs = malloc(sizeof(struct terminal_list *), M_TEMP, M_NOWAIT); + if (it->inputs == NULL) { + printf("uaudio_io_terminaltype: no memory\n"); + return uaudio_io_terminaltype(outtype, iot, src_id); + } + it->inputs[0] = uaudio_io_terminaltype(outtype, iot, src_id); + it->inputs_size = 1; + return uaudio_merge_terminal_list(it); + case UDESCSUB_AC_OUTPUT: + it->inputs = malloc(sizeof(struct terminal_list *), M_TEMP, M_NOWAIT); + if (it->inputs == NULL) { + printf("uaudio_io_terminaltype: no memory\n"); + return NULL; + } + src_id = it->d.ot->bSourceId; + it->inputs[0] = uaudio_io_terminaltype(outtype, iot, src_id); + it->inputs_size = 1; + iot[src_id].direct = TRUE; + return NULL; + case UDESCSUB_AC_MIXER: + it->inputs_size = 0; + it->inputs = malloc(sizeof(struct terminal_list *) + * it->d.mu->bNrInPins, M_TEMP, M_NOWAIT); + if (it->inputs == NULL) { + printf("uaudio_io_terminaltype: no memory\n"); + return NULL; + } + for (i = 0; i < it->d.mu->bNrInPins; i++) { + src_id = it->d.mu->baSourceId[i]; + it->inputs[i] = uaudio_io_terminaltype(outtype, iot, + src_id); + it->inputs_size++; + } + return uaudio_merge_terminal_list(it); + case UDESCSUB_AC_SELECTOR: + it->inputs_size = 0; + it->inputs = malloc(sizeof(struct terminal_list *) + * it->d.su->bNrInPins, M_TEMP, M_NOWAIT); + if (it->inputs == NULL) { + printf("uaudio_io_terminaltype: no memory\n"); + return NULL; + } + for (i = 0; i < it->d.su->bNrInPins; i++) { + src_id = it->d.su->baSourceId[i]; + it->inputs[i] = uaudio_io_terminaltype(outtype, iot, + src_id); + it->inputs_size++; + } + return uaudio_merge_terminal_list(it); + case UDESCSUB_AC_PROCESSING: + it->inputs_size = 0; + it->inputs = malloc(sizeof(struct terminal_list *) + * it->d.pu->bNrInPins, M_TEMP, M_NOWAIT); + if (it->inputs == NULL) { + printf("uaudio_io_terminaltype: no memory\n"); + return NULL; + } + for (i = 0; i < it->d.pu->bNrInPins; i++) { + src_id = it->d.pu->baSourceId[i]; + it->inputs[i] = uaudio_io_terminaltype(outtype, iot, + src_id); + it->inputs_size++; + } + return uaudio_merge_terminal_list(it); + case UDESCSUB_AC_EXTENSION: + it->inputs_size = 0; + it->inputs = malloc(sizeof(struct terminal_list *) + * it->d.eu->bNrInPins, M_TEMP, M_NOWAIT); + if (it->inputs == NULL) { + printf("uaudio_io_terminaltype: no memory\n"); + return NULL; + } + for (i = 0; i < it->d.eu->bNrInPins; i++) { + src_id = it->d.eu->baSourceId[i]; + it->inputs[i] = uaudio_io_terminaltype(outtype, iot, + src_id); + it->inputs_size++; + } + return uaudio_merge_terminal_list(it); + case UDESCSUB_AC_HEADER: + default: + return NULL; + } +} + +Static usbd_status +uaudio_identify(struct uaudio_softc *sc, const usb_config_descriptor_t *cdesc) { usbd_status err; @@ -1204,46 +1733,55 @@ uaudio_identify(struct uaudio_softc *sc, return (uaudio_identify_as(sc, cdesc)); } -void -uaudio_add_alt(struct uaudio_softc *sc, struct as_info *ai) +Static void +uaudio_add_alt(struct uaudio_softc *sc, const struct as_info *ai) { - size_t len = sizeof(*ai) * (sc->sc_nalts + 1); - struct as_info *nai = sc->sc_nalts == 0 ? - malloc(len, M_USBDEV, M_NOWAIT) : - realloc(sc->sc_alts, len, M_USBDEV, M_NOWAIT); + size_t len; + struct as_info *nai; + len = sizeof(*ai) * (sc->sc_nalts + 1); + nai = malloc(len, M_USBDEV, M_NOWAIT); if (nai == NULL) { printf("uaudio_add_alt: no memory\n"); return; } - + /* Copy old data, if there was any */ + if (sc->sc_nalts != 0) { + memcpy(nai, sc->sc_alts, sizeof(*ai) * (sc->sc_nalts)); + free(sc->sc_alts, M_USBDEV); + } sc->sc_alts = nai; DPRINTFN(2,("uaudio_add_alt: adding alt=%d, enc=%d\n", ai->alt, ai->encoding)); sc->sc_alts[sc->sc_nalts++] = *ai; } -usbd_status -uaudio_process_as(struct uaudio_softc *sc, char *buf, int *offsp, - int size, usb_interface_descriptor_t *id) +Static usbd_status +uaudio_process_as(struct uaudio_softc *sc, const char *buf, int *offsp, + int size, const usb_interface_descriptor_t *id) #define offs (*offsp) { - struct usb_audio_streaming_interface_descriptor *asid; - struct usb_audio_streaming_type1_descriptor *asf1d; - usb_endpoint_descriptor_audio_t *ed; - struct usb_audio_streaming_endpoint_descriptor *sed; + const struct usb_audio_streaming_interface_descriptor *asid; + const struct usb_audio_streaming_type1_descriptor *asf1d; + const usb_endpoint_descriptor_audio_t *ed; + const usb_endpoint_descriptor_audio_t *epdesc1; + const struct usb_audio_streaming_endpoint_descriptor *sed; int format, chan, prec, enc; - int dir, type; + int dir, type, sync; struct as_info ai; + const char *format_str; - asid = (void *)(buf + offs); + asid = (const void *)(buf + offs); if (asid->bDescriptorType != UDESC_CS_INTERFACE || asid->bDescriptorSubtype != AS_GENERAL) return (USBD_INVAL); + DPRINTF(("uaudio_process_as: asid: bTerminakLink=%d wFormatTag=%d\n", + asid->bTerminalLink, UGETW(asid->wFormatTag))); offs += asid->bLength; if (offs > size) return (USBD_INVAL); - asf1d = (void *)(buf + offs); + + asf1d = (const void *)(buf + offs); if (asf1d->bDescriptorType != UDESC_CS_INTERFACE || asf1d->bDescriptorSubtype != FORMAT_TYPE) return (USBD_INVAL); @@ -1257,10 +1795,10 @@ uaudio_process_as(struct uaudio_softc *s return (USBD_NORMAL_COMPLETION); } - ed = (void *)(buf + offs); + ed = (const void *)(buf + offs); if (ed->bDescriptorType != UDESC_ENDPOINT) return (USBD_INVAL); - DPRINTF(("uaudio_process_as: endpoint bLength=%d bDescriptorType=%d " + DPRINTF(("uaudio_process_as: endpoint[0] bLength=%d bDescriptorType=%d " "bEndpointAddress=%d bmAttributes=0x%x wMaxPacketSize=%d " "bInterval=%d bRefresh=%d bSynchAddress=%d\n", ed->bLength, ed->bDescriptorType, ed->bEndpointAddress, @@ -1279,78 +1817,166 @@ uaudio_process_as(struct uaudio_softc *s type = UE_ISO_ASYNC; /* We can't handle endpoints that need a sync pipe yet. */ - if (dir == UE_DIR_IN ? type == UE_ISO_ADAPT : type == UE_ISO_ASYNC) { - printf("%s: ignored %sput endpoint of type %s\n", - USBDEVNAME(sc->sc_dev), - dir == UE_DIR_IN ? "in" : "out", - dir == UE_DIR_IN ? "adaptive" : "async"); + sync = FALSE; + if (dir == UE_DIR_IN && type == UE_ISO_ADAPT) { + sync = TRUE; +#ifndef UAUDIO_MULTIPLE_ENDPOINTS + printf("%s: ignored input endpoint of type adaptive\n", + USBDEVNAME(sc->sc_dev)); return (USBD_NORMAL_COMPLETION); +#endif } - - sed = (void *)(buf + offs); + if (dir != UE_DIR_IN && type == UE_ISO_ASYNC) { + sync = TRUE; +#ifndef UAUDIO_MULTIPLE_ENDPOINTS + printf("%s: ignored output endpoint of type async\n", + USBDEVNAME(sc->sc_dev)); + return (USBD_NORMAL_COMPLETION); +#endif + } + + sed = (const void *)(buf + offs); if (sed->bDescriptorType != UDESC_CS_ENDPOINT || sed->bDescriptorSubtype != AS_GENERAL) return (USBD_INVAL); + DPRINTF((" streadming_endpoint: offset=%d bLength=%d\n", offs, sed->bLength)); offs += sed->bLength; if (offs > size) return (USBD_INVAL); - + + if (sync && id->bNumEndpoints <= 1) { + printf("%s: a sync-pipe endpoint but no other endpoint\n", + USBDEVNAME(sc->sc_dev)); + return USBD_INVAL; + } + if (!sync && id->bNumEndpoints > 1) { + printf("%s: non sync-pipe endpoint but multiple endpoints\n", + USBDEVNAME(sc->sc_dev)); + return USBD_INVAL; + } + epdesc1 = NULL; + if (id->bNumEndpoints > 1) { + epdesc1 = (const void*)(buf + offs); + if (epdesc1->bDescriptorType != UDESC_ENDPOINT) + return USBD_INVAL; + DPRINTF(("uaudio_process_as: endpoint[1] bLength=%d " + "bDescriptorType=%d bEndpointAddress=%d " + "bmAttributes=0x%x wMaxPacketSize=%d bInterval=%d " + "bRefresh=%d bSynchAddress=%d\n", + epdesc1->bLength, epdesc1->bDescriptorType, + epdesc1->bEndpointAddress, epdesc1->bmAttributes, + UGETW(epdesc1->wMaxPacketSize), epdesc1->bInterval, + epdesc1->bRefresh, epdesc1->bSynchAddress)); + offs += epdesc1->bLength; + if (offs > size) + return USBD_INVAL; + if (epdesc1->bSynchAddress != 0) { + printf("%s: invalid endpoint: bSynchAddress=0\n", + USBDEVNAME(sc->sc_dev)); + return USBD_INVAL; + } + if (UE_GET_XFERTYPE(epdesc1->bmAttributes) != UE_ISOCHRONOUS) { + printf("%s: invalid endpoint: bmAttributes=0x%x\n", + USBDEVNAME(sc->sc_dev), epdesc1->bmAttributes); + return USBD_INVAL; + } + if (epdesc1->bEndpointAddress != ed->bSynchAddress) { + printf("%s: invalid endpoint addresses: " + "ep[0]->bSynchAddress=0x%x " + "ep[1]->bEndpointAddress=0x%x\n", + USBDEVNAME(sc->sc_dev), ed->bSynchAddress, + epdesc1->bEndpointAddress); + return USBD_INVAL; + } + /* UE_GET_ADDR(epdesc1->bEndpointAddress), and epdesc1->bRefresh */ + } + format = UGETW(asid->wFormatTag); chan = asf1d->bNrChannels; prec = asf1d->bBitResolution; - if (prec != 8 && prec != 16) { -#ifdef USB_DEBUG + if (prec != 8 && prec != 16 && prec != 24) { printf("%s: ignored setting with precision %d\n", USBDEVNAME(sc->sc_dev), prec); -#endif return (USBD_NORMAL_COMPLETION); } switch (format) { case UA_FMT_PCM: - sc->sc_altflags |= prec == 8 ? HAS_8 : HAS_16; + if (prec == 8) { + sc->sc_altflags |= HAS_8; + } else if (prec == 16) { + sc->sc_altflags |= HAS_16; + } else if (prec == 24) { + sc->sc_altflags |= HAS_24; + } enc = AUDIO_ENCODING_SLINEAR_LE; + format_str = "pcm"; break; case UA_FMT_PCM8: enc = AUDIO_ENCODING_ULINEAR_LE; sc->sc_altflags |= HAS_8U; + format_str = "pcm8"; break; case UA_FMT_ALAW: enc = AUDIO_ENCODING_ALAW; sc->sc_altflags |= HAS_ALAW; + format_str = "alaw"; break; case UA_FMT_MULAW: enc = AUDIO_ENCODING_ULAW; sc->sc_altflags |= HAS_MULAW; + format_str = "mulaw"; break; + case UA_FMT_IEEE_FLOAT: default: printf("%s: ignored setting with format %d\n", USBDEVNAME(sc->sc_dev), format); return (USBD_NORMAL_COMPLETION); } - DPRINTFN(1,("uaudio_identify: alt=%d enc=%d chan=%d prec=%d\n", - id->bAlternateSetting, enc, chan, prec)); +#ifdef USB_DEBUG + printf("%s: %s: %dch, %d/%dbit, %s,", USBDEVNAME(sc->sc_dev), + dir == UE_DIR_IN ? "recording" : "playback", + chan, prec, asf1d->bSubFrameSize * 8, format_str); + if (asf1d->bSamFreqType == UA_SAMP_CONTNUOUS) { + printf(" %d-%dHz\n", UA_SAMP_LO(asf1d), UA_SAMP_HI(asf1d)); + } else { + int r; + printf(" %d", UA_GETSAMP(asf1d, 0)); + for (r = 1; r < asf1d->bSamFreqType; r++) + printf(",%d", UA_GETSAMP(asf1d, r)); + printf("Hz\n"); + } +#endif ai.alt = id->bAlternateSetting; ai.encoding = enc; + ai.attributes = sed->bmAttributes; ai.idesc = id; ai.edesc = ed; + ai.edesc1 = epdesc1; ai.asf1desc = asf1d; + ai.sc_busy = 0; uaudio_add_alt(sc, &ai); - sc->sc_chan.terminal = asid->bTerminalLink; /* XXX */ - sc->sc_chan.dir |= dir == UE_DIR_OUT ? AUMODE_PLAY : AUMODE_RECORD; +#ifdef USB_DEBUG + if (ai.attributes & UA_SED_FREQ_CONTROL) + DPRINTFN(1, ("uaudio_process_as: FREQ_CONTROL\n")); + if (ai.attributes & UA_SED_PITCH_CONTROL) + DPRINTFN(1, ("uaudio_process_as: PITCH_CONTROL\n")); +#endif + sc->sc_mode |= (dir == UE_DIR_OUT) ? AUMODE_PLAY : AUMODE_RECORD; + return (USBD_NORMAL_COMPLETION); } #undef offs - -usbd_status -uaudio_identify_as(struct uaudio_softc *sc, usb_config_descriptor_t *cdesc) + +Static usbd_status +uaudio_identify_as(struct uaudio_softc *sc, + const usb_config_descriptor_t *cdesc) { - usb_interface_descriptor_t *id; - usbd_status err; - char *buf; + const usb_interface_descriptor_t *id; + const char *buf; int size, offs; size = UGETW(cdesc->wTotalLength); - buf = (char *)cdesc; + buf = (const char *)cdesc; /* Locate the AudioStreaming interface descriptor. */ offs = 0; @@ -1358,13 +1984,10 @@ uaudio_identify_as(struct uaudio_softc * if (id == NULL) return (USBD_INVAL); - sc->sc_chan.terminal = -1; - sc->sc_chan.dir = 0; - /* Loop through all the alternate settings. */ while (offs <= size) { - DPRINTFN(2, ("uaudio_identify: interface %d\n", - id->bInterfaceNumber)); + DPRINTFN(2, ("uaudio_identify: interface=%d offset=%d\n", + id->bInterfaceNumber, offs)); switch (id->bNumEndpoints) { case 0: DPRINTFN(2, ("uaudio_identify: AS null alt=%d\n", @@ -1372,14 +1995,15 @@ uaudio_identify_as(struct uaudio_softc * sc->sc_nullalt = id->bAlternateSetting; break; case 1: - err = uaudio_process_as(sc, buf, &offs, size, id); +#ifdef UAUDIO_MULTIPLE_ENDPOINTS + case 2: +#endif + uaudio_process_as(sc, buf, &offs, size, id); break; default: -#ifdef USB_DEBUG printf("%s: ignored audio interface with %d " "endpoints\n", USBDEVNAME(sc->sc_dev), id->bNumEndpoints); -#endif break; } id = uaudio_find_iface(buf, size, &offs,UISUBCLASS_AUDIOSTREAM); @@ -1389,30 +2013,30 @@ uaudio_identify_as(struct uaudio_softc * if (offs > size) return (USBD_INVAL); DPRINTF(("uaudio_identify_as: %d alts available\n", sc->sc_nalts)); - if (sc->sc_chan.terminal < 0) { - printf("%s: no useable endpoint found\n", + + if (sc->sc_mode == 0) { + printf("%s: no usable endpoint found\n", USBDEVNAME(sc->sc_dev)); return (USBD_INVAL); } -#ifndef NO_RECORDING - if (sc->sc_chan.dir == (AUMODE_PLAY | AUMODE_RECORD)) - sc->sc_props |= AUDIO_PROP_FULLDUPLEX; -#endif return (USBD_NORMAL_COMPLETION); } -usbd_status -uaudio_identify_ac(struct uaudio_softc *sc, usb_config_descriptor_t *cdesc) +Static usbd_status +uaudio_identify_ac(struct uaudio_softc *sc, const usb_config_descriptor_t *cdesc) { - usb_interface_descriptor_t *id; - struct usb_audio_control_descriptor *acdp; - usb_descriptor_t *dp, *dps[256]; - char *buf, *ibuf, *ibufend; - int size, offs, aclen, ndps, i; + struct io_terminal* iot; + const usb_interface_descriptor_t *id; + const struct usb_audio_control_descriptor *acdp; + const usb_descriptor_t *dp; + const struct usb_audio_output_terminal *pot; + struct terminal_list *tml; + const char *buf, *ibuf, *ibufend; + int size, offs, aclen, ndps, i, j; size = UGETW(cdesc->wTotalLength); - buf = (char *)cdesc; + buf = (const char *)cdesc; /* Locate the AudioControl interface descriptor. */ offs = 0; @@ -1422,11 +2046,11 @@ uaudio_identify_ac(struct uaudio_softc * if (offs + sizeof *acdp > size) return (USBD_INVAL); sc->sc_ac_iface = id->bInterfaceNumber; - DPRINTFN(2,("uaudio_identify: AC interface is %d\n", sc->sc_ac_iface)); + DPRINTFN(2,("uaudio_identify_ac: AC interface is %d\n", sc->sc_ac_iface)); /* A class-specific AC interface header should follow. */ ibuf = buf + offs; - acdp = (struct usb_audio_control_descriptor *)ibuf; + acdp = (const struct usb_audio_control_descriptor *)ibuf; if (acdp->bDescriptorType != UDESC_CS_INTERFACE || acdp->bDescriptorSubtype != UDESCSUB_AC_HEADER) return (USBD_INVAL); @@ -1439,127 +2063,266 @@ uaudio_identify_ac(struct uaudio_softc * return (USBD_INVAL); sc->sc_audio_rev = UGETW(acdp->bcdADC); - DPRINTFN(2,("uaudio_identify: found AC header, vers=%03x, len=%d\n", + DPRINTFN(2,("uaudio_identify_ac: found AC header, vers=%03x, len=%d\n", sc->sc_audio_rev, aclen)); sc->sc_nullalt = -1; /* Scan through all the AC specific descriptors */ ibufend = ibuf + aclen; - dp = (usb_descriptor_t *)ibuf; + dp = (const usb_descriptor_t *)ibuf; ndps = 0; - memset(dps, 0, sizeof dps); + iot = malloc(sizeof(struct io_terminal) * 256, M_TEMP, M_NOWAIT | M_ZERO); + if (iot == NULL) { + printf("%s: no memory\n", __func__); + return USBD_NOMEM; + } for (;;) { ibuf += dp->bLength; if (ibuf >= ibufend) break; - dp = (usb_descriptor_t *)ibuf; + dp = (const usb_descriptor_t *)ibuf; if (ibuf + dp->bLength > ibufend) return (USBD_INVAL); if (dp->bDescriptorType != UDESC_CS_INTERFACE) { - printf("uaudio_identify: skip desc type=0x%02x\n", + printf("uaudio_identify_ac: skip desc type=0x%02x\n", dp->bDescriptorType); continue; } - i = ((struct usb_audio_input_terminal *)dp)->bTerminalId; - dps[i] = dp; + i = ((const struct usb_audio_input_terminal *)dp)->bTerminalId; + iot[i].d.desc = dp; if (i > ndps) ndps = i; } ndps++; + /* construct io_terminal */ for (i = 0; i < ndps; i++) { - dp = dps[i]; + dp = iot[i].d.desc; if (dp == NULL) continue; - DPRINTF(("uaudio_identify: subtype=%d\n", - dp->bDescriptorSubtype)); + if (dp->bDescriptorSubtype != UDESCSUB_AC_OUTPUT) + continue; + pot = iot[i].d.ot; + tml = uaudio_io_terminaltype(UGETW(pot->wTerminalType), iot, i); + if (tml != NULL) + free(tml, M_TEMP); + } + +#ifdef USB_DEBUG + for (i = 0; i < 256; i++) { + struct usb_audio_cluster cluster; + + if (iot[i].d.desc == NULL) + continue; + logprintf("id %d:\t", i); + switch (iot[i].d.desc->bDescriptorSubtype) { + case UDESCSUB_AC_INPUT: + logprintf("AC_INPUT type=%s\n", uaudio_get_terminal_name + (UGETW(iot[i].d.it->wTerminalType))); + logprintf("\t"); + cluster = uaudio_get_cluster(i, iot); + uaudio_dump_cluster(&cluster); + logprintf("\n"); + break; + case UDESCSUB_AC_OUTPUT: + logprintf("AC_OUTPUT type=%s ", uaudio_get_terminal_name + (UGETW(iot[i].d.ot->wTerminalType))); + logprintf("src=%d\n", iot[i].d.ot->bSourceId); + break; + case UDESCSUB_AC_MIXER: + logprintf("AC_MIXER src="); + for (j = 0; j < iot[i].d.mu->bNrInPins; j++) + logprintf("%d ", iot[i].d.mu->baSourceId[j]); + logprintf("\n\t"); + cluster = uaudio_get_cluster(i, iot); + uaudio_dump_cluster(&cluster); + logprintf("\n"); + break; + case UDESCSUB_AC_SELECTOR: + logprintf("AC_SELECTOR src="); + for (j = 0; j < iot[i].d.su->bNrInPins; j++) + logprintf("%d ", iot[i].d.su->baSourceId[j]); + logprintf("\n"); + break; + case UDESCSUB_AC_FEATURE: + logprintf("AC_FEATURE src=%d\n", iot[i].d.fu->bSourceId); + break; + case UDESCSUB_AC_PROCESSING: + logprintf("AC_PROCESSING src="); + for (j = 0; j < iot[i].d.pu->bNrInPins; j++) + logprintf("%d ", iot[i].d.pu->baSourceId[j]); + logprintf("\n\t"); + cluster = uaudio_get_cluster(i, iot); + uaudio_dump_cluster(&cluster); + logprintf("\n"); + break; + case UDESCSUB_AC_EXTENSION: + logprintf("AC_EXTENSION src="); + for (j = 0; j < iot[i].d.eu->bNrInPins; j++) + logprintf("%d ", iot[i].d.eu->baSourceId[j]); + logprintf("\n\t"); + cluster = uaudio_get_cluster(i, iot); + uaudio_dump_cluster(&cluster); + logprintf("\n"); + break; + default: + logprintf("unknown audio control (subtype=%d)\n", + iot[i].d.desc->bDescriptorSubtype); + } + for (j = 0; j < iot[i].inputs_size; j++) { + int k; + logprintf("\tinput%d: ", j); + tml = iot[i].inputs[j]; + if (tml == NULL) { + logprintf("NULL\n"); + continue; + } + for (k = 0; k < tml->size; k++) + logprintf("%s ", uaudio_get_terminal_name + (tml->terminals[k])); + logprintf("\n"); + } + logprintf("\toutput: "); + tml = iot[i].output; + for (j = 0; j < tml->size; j++) + logprintf("%s ", uaudio_get_terminal_name(tml->terminals[j])); + logprintf("\n"); + } +#endif + + for (i = 0; i < ndps; i++) { + dp = iot[i].d.desc; + if (dp == NULL) + continue; + DPRINTF(("uaudio_identify_ac: id=%d subtype=%d\n", + i, dp->bDescriptorSubtype)); switch (dp->bDescriptorSubtype) { case UDESCSUB_AC_HEADER: - printf("uaudio_identify: unexpected AC header\n"); + printf("uaudio_identify_ac: unexpected AC header\n"); break; case UDESCSUB_AC_INPUT: - uaudio_add_input(sc, dp, dps); + uaudio_add_input(sc, iot, i); break; case UDESCSUB_AC_OUTPUT: - uaudio_add_output(sc, dp, dps); + uaudio_add_output(sc, iot, i); break; case UDESCSUB_AC_MIXER: - uaudio_add_mixer(sc, dp, dps); + uaudio_add_mixer(sc, iot, i); break; case UDESCSUB_AC_SELECTOR: - uaudio_add_selector(sc, dp, dps); + uaudio_add_selector(sc, iot, i); break; case UDESCSUB_AC_FEATURE: - uaudio_add_feature(sc, dp, dps); + uaudio_add_feature(sc, iot, i); break; case UDESCSUB_AC_PROCESSING: - uaudio_add_processing(sc, dp, dps); + uaudio_add_processing(sc, iot, i); break; case UDESCSUB_AC_EXTENSION: - uaudio_add_extension(sc, dp, dps); + uaudio_add_extension(sc, iot, i); break; default: - printf("uaudio_identify: bad AC desc subtype=0x%02x\n", + printf("uaudio_identify_ac: bad AC desc subtype=0x%02x\n", dp->bDescriptorSubtype); break; } } + + /* delete io_terminal */ + for (i = 0; i < 256; i++) { + if (iot[i].d.desc == NULL) + continue; + if (iot[i].inputs != NULL) { + for (j = 0; j < iot[i].inputs_size; j++) { + if (iot[i].inputs[j] != NULL) + free(iot[i].inputs[j], M_TEMP); + } + free(iot[i].inputs, M_TEMP); + } + if (iot[i].output != NULL) + free(iot[i].output, M_TEMP); + iot[i].d.desc = NULL; + } + free(iot, M_TEMP); + return (USBD_NORMAL_COMPLETION); } #if defined(__NetBSD__) || defined(__OpenBSD__) -int +Static int uaudio_query_devinfo(void *addr, mixer_devinfo_t *mi) { struct uaudio_softc *sc = addr; struct mixerctl *mc; - int n, nctls; + int n, nctls, i; DPRINTFN(2,("uaudio_query_devinfo: index=%d\n", mi->index)); if (sc->sc_dying) return (EIO); - + n = mi->index; nctls = sc->sc_nctls; - if (n < 0 || n >= nctls) { - switch (n - nctls) { - case UAC_OUTPUT: - mi->type = AUDIO_MIXER_CLASS; - mi->mixer_class = nctls + UAC_OUTPUT; - mi->next = mi->prev = AUDIO_MIXER_LAST; - strcpy(mi->label.name, AudioCoutputs); - return (0); - case UAC_INPUT: - mi->type = AUDIO_MIXER_CLASS; - mi->mixer_class = nctls + UAC_INPUT; - mi->next = mi->prev = AUDIO_MIXER_LAST; - strcpy(mi->label.name, AudioCinputs); - return (0); - case UAC_EQUAL: - mi->type = AUDIO_MIXER_CLASS; - mi->mixer_class = nctls + UAC_EQUAL; - mi->next = mi->prev = AUDIO_MIXER_LAST; - strcpy(mi->label.name, AudioCequalization); - return (0); - default: - return (ENXIO); - } + switch (n) { + case UAC_OUTPUT: + mi->type = AUDIO_MIXER_CLASS; + mi->mixer_class = UAC_OUTPUT; + mi->next = mi->prev = AUDIO_MIXER_LAST; + strlcpy(mi->label.name, AudioCoutputs, sizeof(mi->label.name)); + return (0); + case UAC_INPUT: + mi->type = AUDIO_MIXER_CLASS; + mi->mixer_class = UAC_INPUT; + mi->next = mi->prev = AUDIO_MIXER_LAST; + strlcpy(mi->label.name, AudioCinputs, sizeof(mi->label.name)); + return (0); + case UAC_EQUAL: + mi->type = AUDIO_MIXER_CLASS; + mi->mixer_class = UAC_EQUAL; + mi->next = mi->prev = AUDIO_MIXER_LAST; + strlcpy(mi->label.name, AudioCequalization, + sizeof(mi->label.name)); + return (0); + case UAC_RECORD: + mi->type = AUDIO_MIXER_CLASS; + mi->mixer_class = UAC_RECORD; + mi->next = mi->prev = AUDIO_MIXER_LAST; + strlcpy(mi->label.name, AudioCrecord, sizeof(mi->label.name)); + return 0; + default: + break; } + + n -= UAC_NCLASSES; + if (n < 0 || n >= nctls) + return (ENXIO); + mc = &sc->sc_ctls[n]; - strncpy(mi->label.name, mc->ctlname, MAX_AUDIO_DEV_LEN); + strlcpy(mi->label.name, mc->ctlname, sizeof(mi->label.name)); mi->mixer_class = mc->class; mi->next = mi->prev = AUDIO_MIXER_LAST; /* XXX */ switch (mc->type) { case MIX_ON_OFF: mi->type = AUDIO_MIXER_ENUM; mi->un.e.num_mem = 2; - strcpy(mi->un.e.member[0].label.name, AudioNoff); + strlcpy(mi->un.e.member[0].label.name, AudioNoff, + sizeof(mi->un.e.member[0].label.name)); mi->un.e.member[0].ord = 0; - strcpy(mi->un.e.member[1].label.name, AudioNon); + strlcpy(mi->un.e.member[1].label.name, AudioNon, + sizeof(mi->un.e.member[1].label.name)); mi->un.e.member[1].ord = 1; break; + case MIX_SELECTOR: + mi->type = AUDIO_MIXER_ENUM; + mi->un.e.num_mem = mc->maxval - mc->minval + 1; + for (i = 0; i <= mc->maxval - mc->minval; i++) { + snprintf(mi->un.e.member[i].label.name, + sizeof(mi->un.e.member[i].label.name), + "%d", i + mc->minval); + mi->un.e.member[i].ord = i + mc->minval; + } + break; default: mi->type = AUDIO_MIXER_VALUE; strncpy(mi->un.v.units.name, mc->ctlunit, MAX_AUDIO_DEV_LEN); @@ -1570,60 +2333,42 @@ uaudio_query_devinfo(void *addr, mixer_d return (0); } -int +Static int uaudio_open(void *addr, int flags) { struct uaudio_softc *sc = addr; - DPRINTF(("uaudio_open: sc=%p\n", sc)); + DPRINTF(("uaudio_open: sc=%p\n", sc)); if (sc->sc_dying) return (EIO); - if (sc->sc_chan.terminal < 0) - return (ENXIO); - - if ((flags & FREAD) && !(sc->sc_chan.dir & AUMODE_RECORD)) + if ((flags & FWRITE) && !(sc->sc_mode & AUMODE_PLAY)) return (EACCES); - if ((flags & FWRITE) && !(sc->sc_chan.dir & AUMODE_PLAY)) + if ((flags & FREAD) && !(sc->sc_mode & AUMODE_RECORD)) return (EACCES); - sc->sc_chan.intr = 0; - - return (0); + return (0); } /* * Close function is called at splaudio(). */ -void +Static void uaudio_close(void *addr) { - struct uaudio_softc *sc = addr; - - if (sc->sc_dying) - return (EIO); - - DPRINTF(("uaudio_close: sc=%p\n", sc)); - uaudio_halt_in_dma(sc); - uaudio_halt_out_dma(sc); - - sc->sc_chan.intr = 0; } -int +Static int uaudio_drain(void *addr) { struct uaudio_softc *sc = addr; - if (sc->sc_dying) - return (EIO); - usbd_delay_ms(sc->sc_udev, UAUDIO_NCHANBUFS * UAUDIO_NFRAMES); return (0); } -int +Static int uaudio_halt_out_dma(void *addr) { struct uaudio_softc *sc = addr; @@ -1632,29 +2377,31 @@ uaudio_halt_out_dma(void *addr) return (EIO); DPRINTF(("uaudio_halt_out_dma: enter\n")); - if (sc->sc_chan.pipe != NULL) { - uaudio_chan_close(sc, &sc->sc_chan); - sc->sc_chan.pipe = 0; - uaudio_chan_free_buffers(sc, &sc->sc_chan); + if (sc->sc_playchan.pipe != NULL) { + uaudio_chan_close(sc, &sc->sc_playchan); + sc->sc_playchan.pipe = NULL; + uaudio_chan_free_buffers(sc, &sc->sc_playchan); + sc->sc_playchan.intr = NULL; } - return (0); + return (0); } -int +Static int uaudio_halt_in_dma(void *addr) { struct uaudio_softc *sc = addr; DPRINTF(("uaudio_halt_in_dma: enter\n")); - if (sc->sc_chan.pipe != NULL) { - uaudio_chan_close(sc, &sc->sc_chan); - sc->sc_chan.pipe = 0; - uaudio_chan_free_buffers(sc, &sc->sc_chan); + if (sc->sc_recchan.pipe != NULL) { + uaudio_chan_close(sc, &sc->sc_recchan); + sc->sc_recchan.pipe = NULL; + uaudio_chan_free_buffers(sc, &sc->sc_recchan); + sc->sc_recchan.intr = NULL; } - return (0); + return (0); } -int +Static int uaudio_getdev(void *addr, struct audio_device *retp) { struct uaudio_softc *sc = addr; @@ -1662,24 +2409,30 @@ uaudio_getdev(void *addr, struct audio_d DPRINTF(("uaudio_mixer_getdev:\n")); if (sc->sc_dying) return (EIO); - + *retp = uaudio_device; - return (0); + return (0); } /* * Make sure the block size is large enough to hold all outstanding transfers. */ -int +Static int uaudio_round_blocksize(void *addr, int blk) { struct uaudio_softc *sc = addr; int bpf; - if (sc->sc_dying) - return (EIO); - - bpf = sc->sc_chan.bytes_per_frame + sc->sc_chan.sample_size; + DPRINTF(("uaudio_round_blocksize: p.bpf=%d r.bpf=%d\n", + sc->sc_playchan.bytes_per_frame, + sc->sc_recchan.bytes_per_frame)); + if (sc->sc_playchan.bytes_per_frame > sc->sc_recchan.bytes_per_frame) { + bpf = sc->sc_playchan.bytes_per_frame + + sc->sc_playchan.sample_size; + } else { + bpf = sc->sc_recchan.bytes_per_frame + + sc->sc_recchan.sample_size; + } /* XXX */ bpf *= UAUDIO_NFRAMES * UAUDIO_NCHANBUFS; @@ -1699,17 +2452,15 @@ uaudio_round_blocksize(void *addr, int b return (blk); } -int +Static int uaudio_get_props(void *addr) { - struct uaudio_softc *sc = addr; + return (AUDIO_PROP_FULLDUPLEX | AUDIO_PROP_INDEPENDENT); - return (sc->sc_props); } #endif /* NetBSD or OpenBSD */ - -int +Static int uaudio_get(struct uaudio_softc *sc, int which, int type, int wValue, int wIndex, int len) { @@ -1718,8 +2469,10 @@ uaudio_get(struct uaudio_softc *sc, int usbd_status err; int val; +#if defined(__FreeBSD__) if (sc->sc_dying) return (EIO); +#endif if (wValue == -1) return (0); @@ -1730,9 +2483,9 @@ uaudio_get(struct uaudio_softc *sc, int USETW(req.wIndex, wIndex); USETW(req.wLength, len); DPRINTFN(2,("uaudio_get: type=0x%02x req=0x%02x wValue=0x%04x " - "wIndex=0x%04x len=%d\n", + "wIndex=0x%04x len=%d\n", type, which, wValue, wIndex, len)); - err = usbd_do_request(sc->sc_udev, &req, &data); + err = usbd_do_request(sc->sc_udev, &req, data); if (err) { DPRINTF(("uaudio_get: err=%s\n", usbd_errstr(err))); return (-1); @@ -1752,7 +2505,7 @@ uaudio_get(struct uaudio_softc *sc, int return (val); } -void +Static void uaudio_set(struct uaudio_softc *sc, int which, int type, int wValue, int wIndex, int len, int val) { @@ -1760,8 +2513,10 @@ uaudio_set(struct uaudio_softc *sc, int u_int8_t data[4]; usbd_status err; +#if defined(__FreeBSD__) if (sc->sc_dying) return; +#endif if (wValue == -1) return; @@ -1783,16 +2538,16 @@ uaudio_set(struct uaudio_softc *sc, int return; } DPRINTFN(2,("uaudio_set: type=0x%02x req=0x%02x wValue=0x%04x " - "wIndex=0x%04x len=%d, val=%d\n", + "wIndex=0x%04x len=%d, val=%d\n", type, which, wValue, wIndex, len, val & 0xffff)); - err = usbd_do_request(sc->sc_udev, &req, &data); + err = usbd_do_request(sc->sc_udev, &req, data); #ifdef USB_DEBUG if (err) DPRINTF(("uaudio_set: err=%d\n", err)); #endif } -int +Static int uaudio_signext(int type, int val) { if (!MIX_UNSIGNED(type)) { @@ -1805,15 +2560,18 @@ uaudio_signext(int type, int val) } #if defined(__NetBSD__) || defined(__OpenBSD__) -int +Static int uaudio_value2bsd(struct mixerctl *mc, int val) { DPRINTFN(5, ("uaudio_value2bsd: type=%03x val=%d min=%d max=%d ", mc->type, val, mc->minval, mc->maxval)); - if (mc->type == MIX_ON_OFF) - val = val != 0; - else - val = ((uaudio_signext(mc->type, val) - mc->minval) * 256 + if (mc->type == MIX_ON_OFF) { + val = (val != 0); + } else if (mc->type == MIX_SELECTOR) { + if (val < mc->minval || val > mc->maxval) + val = mc->minval; + } else + val = ((uaudio_signext(mc->type, val) - mc->minval) * 255 + mc->mul/2) / mc->mul; DPRINTFN(5, ("val'=%d\n", val)); return (val); @@ -1825,17 +2583,20 @@ uaudio_bsd2value(struct mixerctl *mc, in { DPRINTFN(5,("uaudio_bsd2value: type=%03x val=%d min=%d max=%d ", mc->type, val, mc->minval, mc->maxval)); - if (mc->type == MIX_ON_OFF) - val = val != 0; - else - val = (val + mc->delta/2) * mc->mul / 256 + mc->minval; + if (mc->type == MIX_ON_OFF) { + val = (val != 0); + } else if (mc->type == MIX_SELECTOR) { + if (val < mc->minval || val > mc->maxval) + val = mc->minval; + } else + val = (val + mc->delta/2) * mc->mul / 255 + mc->minval; DPRINTFN(5, ("val'=%d\n", val)); return (val); } #if defined(__NetBSD__) || defined(__OpenBSD__) -int -uaudio_ctl_get(struct uaudio_softc *sc, int which, struct mixerctl *mc, +Static int +uaudio_ctl_get(struct uaudio_softc *sc, int which, struct mixerctl *mc, int chan) { int val; @@ -1847,7 +2608,7 @@ uaudio_ctl_get(struct uaudio_softc *sc, } #endif -void +Static void uaudio_ctl_set(struct uaudio_softc *sc, int which, struct mixerctl *mc, int chan, int val) { @@ -1857,7 +2618,7 @@ uaudio_ctl_set(struct uaudio_softc *sc, } #if defined(__NetBSD__) || defined(__OpenBSD__) -int +Static int uaudio_mixer_get_port(void *addr, mixer_ctrl_t *cp) { struct uaudio_softc *sc = addr; @@ -1868,8 +2629,8 @@ uaudio_mixer_get_port(void *addr, mixer_ if (sc->sc_dying) return (EIO); - - n = cp->dev; + + n = cp->dev - UAC_NCLASSES; if (n < 0 || n >= sc->sc_nctls) return (ENXIO); mc = &sc->sc_ctls[n]; @@ -1878,6 +2639,10 @@ uaudio_mixer_get_port(void *addr, mixer_ if (cp->type != AUDIO_MIXER_ENUM) return (EINVAL); cp->un.ord = uaudio_ctl_get(sc, GET_CUR, mc, 0); + } else if (mc->type == MIX_SELECTOR) { + if (cp->type != AUDIO_MIXER_ENUM) + return (EINVAL); + cp->un.ord = uaudio_ctl_get(sc, GET_CUR, mc, 0); } else { if (cp->type != AUDIO_MIXER_VALUE) return (EINVAL); @@ -1897,8 +2662,8 @@ uaudio_mixer_get_port(void *addr, mixer_ return (0); } - -int + +Static int uaudio_mixer_set_port(void *addr, mixer_ctrl_t *cp) { struct uaudio_softc *sc = addr; @@ -1908,8 +2673,8 @@ uaudio_mixer_set_port(void *addr, mixer_ DPRINTFN(2,("uaudio_mixer_set_port: index = %d\n", cp->dev)); if (sc->sc_dying) return (EIO); - - n = cp->dev; + + n = cp->dev - UAC_NCLASSES; if (n < 0 || n >= sc->sc_nctls) return (ENXIO); mc = &sc->sc_ctls[n]; @@ -1918,6 +2683,10 @@ uaudio_mixer_set_port(void *addr, mixer_ if (cp->type != AUDIO_MIXER_ENUM) return (EINVAL); uaudio_ctl_set(sc, SET_CUR, mc, 0, cp->un.ord); + } else if (mc->type == MIX_SELECTOR) { + if (cp->type != AUDIO_MIXER_ENUM) + return (EINVAL); + uaudio_ctl_set(sc, SET_CUR, mc, 0, cp->un.ord); } else { if (cp->type != AUDIO_MIXER_VALUE) return (EINVAL); @@ -1935,13 +2704,13 @@ uaudio_mixer_set_port(void *addr, mixer_ return (0); } -int +Static int uaudio_trigger_input(void *addr, void *start, void *end, int blksize, void (*intr)(void *), void *arg, struct audio_params *param) { struct uaudio_softc *sc = addr; - struct chan *ch = &sc->sc_chan; + struct chan *ch = &sc->sc_recchan; usbd_status err; int i, s; @@ -1951,7 +2720,7 @@ uaudio_trigger_input(void *addr, void *s DPRINTFN(3,("uaudio_trigger_input: sc=%p start=%p end=%p " "blksize=%d\n", sc, start, end, blksize)); - uaudio_chan_set_param(ch, param, start, end, blksize); + uaudio_chan_set_param(ch, start, end, blksize); DPRINTFN(3,("uaudio_trigger_input: sample_size=%d bytes/frame=%d " "fraction=0.%03d\n", ch->sample_size, ch->bytes_per_frame, ch->fraction)); @@ -1966,24 +2735,24 @@ uaudio_trigger_input(void *addr, void *s return (EIO); } - sc->sc_chan.intr = intr; - sc->sc_chan.arg = arg; + ch->intr = intr; + ch->arg = arg; s = splusb(); for (i = 0; i < UAUDIO_NCHANBUFS-1; i++) /* XXX -1 shouldn't be needed */ uaudio_chan_rtransfer(ch); splx(s); - return (0); + return (0); } - -int + +Static int uaudio_trigger_output(void *addr, void *start, void *end, int blksize, void (*intr)(void *), void *arg, struct audio_params *param) { struct uaudio_softc *sc = addr; - struct chan *ch = &sc->sc_chan; + struct chan *ch = &sc->sc_playchan; usbd_status err; int i, s; @@ -1993,7 +2762,7 @@ uaudio_trigger_output(void *addr, void * DPRINTFN(3,("uaudio_trigger_output: sc=%p start=%p end=%p " "blksize=%d\n", sc, start, end, blksize)); - uaudio_chan_set_param(ch, param, start, end, blksize); + uaudio_chan_set_param(ch, start, end, blksize); DPRINTFN(3,("uaudio_trigger_output: sample_size=%d bytes/frame=%d " "fraction=0.%03d\n", ch->sample_size, ch->bytes_per_frame, ch->fraction)); @@ -2008,30 +2777,32 @@ uaudio_trigger_output(void *addr, void * return (EIO); } - sc->sc_chan.intr = intr; - sc->sc_chan.arg = arg; + ch->intr = intr; + ch->arg = arg; s = splusb(); for (i = 0; i < UAUDIO_NCHANBUFS-1; i++) /* XXX */ uaudio_chan_ptransfer(ch); splx(s); - return (0); + return (0); } #endif /* NetBSD or OpenBSD */ /* Set up a pipe for a channel. */ -usbd_status +Static usbd_status uaudio_chan_open(struct uaudio_softc *sc, struct chan *ch) { - struct as_info *as = &sc->sc_alts[sc->sc_curaltidx]; + struct as_info *as = &sc->sc_alts[ch->altidx]; int endpt = as->edesc->bEndpointAddress; usbd_status err; +#if defined(__FreeBSD__) if (sc->sc_dying) return (EIO); +#endif - DPRINTF(("uaudio_open_chan: endpt=0x%02x, speed=%d, alt=%d\n", + DPRINTF(("uaudio_chan_open: endpt=0x%02x, speed=%d, alt=%d\n", endpt, ch->sample_rate, as->alt)); /* Set alternate interface corresponding to the mode. */ @@ -2039,39 +2810,59 @@ uaudio_chan_open(struct uaudio_softc *sc if (err) return (err); - /* Some devices do not support this request, so ignore errors. */ -#ifdef USB_DEBUG - err = uaudio_set_speed(sc, endpt, ch->sample_rate); - if (err) - DPRINTF(("uaudio_chan_open: set_speed failed err=%s\n", - usbd_errstr(err))); -#else - (void)uaudio_set_speed(sc, endpt, ch->sample_rate); -#endif + /* + * If just one sampling rate is supported, + * no need to call uaudio_set_speed(). + * Roland SD-90 freezes by a SAMPLING_FREQ_CONTROL request. + */ + if (as->asf1desc->bSamFreqType != 1) { + err = uaudio_set_speed(sc, endpt, ch->sample_rate); + if (err) + DPRINTF(("uaudio_chan_open: set_speed failed err=%s\n", + usbd_errstr(err))); + } - DPRINTF(("uaudio_open_chan: create pipe to 0x%02x\n", endpt)); + ch->pipe = 0; + ch->sync_pipe = 0; + DPRINTF(("uaudio_chan_open: create pipe to 0x%02x\n", endpt)); err = usbd_open_pipe(as->ifaceh, endpt, 0, &ch->pipe); - return (err); + if (err) + return err; + if (as->edesc1 != NULL) { + endpt = as->edesc1->bEndpointAddress; + DPRINTF(("uaudio_chan_open: create sync-pipe to 0x%02x\n", endpt)); + err = usbd_open_pipe(as->ifaceh, endpt, 0, &ch->sync_pipe); + } + return err; } -void +Static void uaudio_chan_close(struct uaudio_softc *sc, struct chan *ch) { - struct as_info *as = &sc->sc_alts[sc->sc_curaltidx]; + struct as_info *as = &sc->sc_alts[ch->altidx]; +#if defined(__FreeBSD__) if (sc->sc_dying) return ; +#endif + as->sc_busy = 0; if (sc->sc_nullalt >= 0) { - DPRINTF(("uaudio_close_chan: set null alt=%d\n", + DPRINTF(("uaudio_chan_close: set null alt=%d\n", sc->sc_nullalt)); usbd_set_interface(as->ifaceh, sc->sc_nullalt); } - usbd_abort_pipe(ch->pipe); - usbd_close_pipe(ch->pipe); + if (ch->pipe) { + usbd_abort_pipe(ch->pipe); + usbd_close_pipe(ch->pipe); + } + if (ch->sync_pipe) { + usbd_abort_pipe(ch->sync_pipe); + usbd_close_pipe(ch->sync_pipe); + } } -usbd_status +Static usbd_status uaudio_chan_alloc_buffers(struct uaudio_softc *sc, struct chan *ch) { usbd_xfer_handle xfer; @@ -2102,7 +2893,7 @@ bad: return (USBD_NOMEM); } -void +Static void uaudio_chan_free_buffers(struct uaudio_softc *sc, struct chan *ch) { int i; @@ -2112,7 +2903,7 @@ uaudio_chan_free_buffers(struct uaudio_s } /* Called at splusb() */ -void +Static void uaudio_chan_ptransfer(struct chan *ch) { struct chanbuf *cb; @@ -2133,7 +2924,7 @@ uaudio_chan_ptransfer(struct chan *ch) size = ch->bytes_per_frame; residue += ch->fraction; if (residue >= USB_FRAMES_PER_SECOND) { - if (!ch->nofrac) + if ((ch->sc->sc_altflags & UA_NOFRAC) == 0) size += ch->sample_size; residue -= USB_FRAMES_PER_SECOND; } @@ -2143,7 +2934,7 @@ uaudio_chan_ptransfer(struct chan *ch) ch->residue = residue; cb->size = total; - /* + /* * Transfer data from upper layer buffer to channel buffer, taking * care of wrapping the upper layer buffer. */ @@ -2170,14 +2961,14 @@ uaudio_chan_ptransfer(struct chan *ch) DPRINTFN(5,("uaudio_chan_transfer: ptransfer xfer=%p\n", cb->xfer)); /* Fill the request */ - usbd_setup_isoc_xfer(cb->xfer, ch->pipe, cb, cb->sizes, - UAUDIO_NFRAMES, USBD_NO_COPY, + usbd_setup_isoc_xfer(cb->xfer, ch->pipe, cb, cb->sizes, + UAUDIO_NFRAMES, USBD_NO_COPY, uaudio_chan_pintr); (void)usbd_transfer(cb->xfer); } -void +Static void uaudio_chan_pintr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) { @@ -2211,7 +3002,7 @@ uaudio_chan_pintr(usbd_xfer_handle xfer, /* Call back to upper layer */ while (ch->transferred >= ch->blksize) { ch->transferred -= ch->blksize; - DPRINTFN(5,("uaudio_chan_pintr: call %p(%p)\n", + DPRINTFN(5,("uaudio_chan_pintr: call %p(%p)\n", ch->intr, ch->arg)); ch->intr(ch->arg); } @@ -2223,7 +3014,7 @@ uaudio_chan_pintr(usbd_xfer_handle xfer, } /* Called at splusb() */ -void +Static void uaudio_chan_rtransfer(struct chan *ch) { struct chanbuf *cb; @@ -2242,13 +3033,8 @@ uaudio_chan_rtransfer(struct chan *ch) total = 0; for (i = 0; i < UAUDIO_NFRAMES; i++) { size = ch->bytes_per_frame; - residue += ch->fraction; - if (residue >= USB_FRAMES_PER_SECOND) { - if (!ch->nofrac) - size += ch->sample_size; - residue -= USB_FRAMES_PER_SECOND; - } cb->sizes[i] = size; + cb->offsets[i] = total; total += size; } ch->residue = residue; @@ -2266,21 +3052,21 @@ uaudio_chan_rtransfer(struct chan *ch) DPRINTFN(5,("uaudio_chan_rtransfer: transfer xfer=%p\n", cb->xfer)); /* Fill the request */ - usbd_setup_isoc_xfer(cb->xfer, ch->pipe, cb, cb->sizes, - UAUDIO_NFRAMES, USBD_NO_COPY, + usbd_setup_isoc_xfer(cb->xfer, ch->pipe, cb, cb->sizes, + UAUDIO_NFRAMES, USBD_NO_COPY, uaudio_chan_rintr); (void)usbd_transfer(cb->xfer); } -void +Static void uaudio_chan_rintr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) { struct chanbuf *cb = priv; struct chan *ch = cb->chan; u_int32_t count; - int s, n; + int s, i, n, frsize; /* Return if we are aborting. */ if (status == USBD_CANCELLED) @@ -2290,36 +3076,34 @@ uaudio_chan_rintr(usbd_xfer_handle xfer, DPRINTFN(5,("uaudio_chan_rintr: count=%d, transferred=%d\n", count, ch->transferred)); - if (count < cb->size) { - /* if the device fails to keep up, copy last byte */ - u_char b = count ? cb->buffer[count-1] : 0; - while (count < cb->size) - cb->buffer[count++] = b; - } - + /* count < cb->size is normal for asynchronous source */ #ifdef DIAGNOSTIC - if (count != cb->size) { - printf("uaudio_chan_rintr: count(%d) != size(%d)\n", + if (count > cb->size) { + printf("uaudio_chan_rintr: count(%d) > size(%d)\n", count, cb->size); } #endif - /* + /* * Transfer data from channel buffer to upper layer buffer, taking * care of wrapping the upper layer buffer. */ - n = min(count, ch->end - ch->cur); - memcpy(ch->cur, cb->buffer, n); - ch->cur += n; - if (ch->cur >= ch->end) - ch->cur = ch->start; - if (count > n) { - memcpy(ch->cur, cb->buffer + n, count - n); - ch->cur += count - n; + for(i = 0; i < UAUDIO_NFRAMES; i++) { + frsize = cb->sizes[i]; + n = min(frsize, ch->end - ch->cur); + memcpy(ch->cur, cb->buffer + cb->offsets[i], n); + ch->cur += n; + if (ch->cur >= ch->end) + ch->cur = ch->start; + if (frsize > n) { + memcpy(ch->cur, cb->buffer + cb->offsets[i] + n, + frsize - n); + ch->cur += frsize - n; + } } /* Call back to upper layer */ - ch->transferred += cb->size; + ch->transferred += count; #if defined(__FreeBSD__) s = spltty(); chn_intr(ch->pcm_ch); @@ -2328,7 +3112,7 @@ uaudio_chan_rintr(usbd_xfer_handle xfer, s = splaudio(); while (ch->transferred >= ch->blksize) { ch->transferred -= ch->blksize; - DPRINTFN(5,("uaudio_chan_rintr: call %p(%p)\n", + DPRINTFN(5,("uaudio_chan_rintr: call %p(%p)\n", ch->intr, ch->arg)); ch->intr(ch->arg); } @@ -2340,20 +3124,30 @@ uaudio_chan_rintr(usbd_xfer_handle xfer, } #if defined(__NetBSD__) || defined(__OpenBSD__) -void -uaudio_chan_set_param(struct chan *ch, struct audio_params *param, - u_char *start, u_char *end, int blksize) +Static void +uaudio_chan_init(struct chan *ch, int altidx, const struct audio_params *param, + int maxpktsize) { int samples_per_frame, sample_size; - sample_size = param->precision * param->channels / 8; - samples_per_frame = param->sample_rate / USB_FRAMES_PER_SECOND; - ch->fraction = param->sample_rate % USB_FRAMES_PER_SECOND; + ch->altidx = altidx; + sample_size = param->precision * param->factor * param->hw_channels / 8; + samples_per_frame = param->hw_sample_rate / USB_FRAMES_PER_SECOND; ch->sample_size = sample_size; - ch->sample_rate = param->sample_rate; - ch->bytes_per_frame = samples_per_frame * sample_size; + ch->sample_rate = param->hw_sample_rate; + if (maxpktsize == 0) { + ch->fraction = param->hw_sample_rate % USB_FRAMES_PER_SECOND; + ch->bytes_per_frame = samples_per_frame * sample_size; + } else { + ch->fraction = 0; + ch->bytes_per_frame = maxpktsize; + } ch->residue = 0; +} +Static void +uaudio_chan_set_param(struct chan *ch, u_char *start, u_char *end, int blksize) +{ ch->start = start; ch->end = end; ch->cur = start; @@ -2363,14 +3157,164 @@ uaudio_chan_set_param(struct chan *ch, s ch->curchanbuf = 0; } -int +Static void +uaudio_get_minmax_rates(int nalts, const struct as_info *alts, + const struct audio_params *p, int mode, + u_long *min, u_long *max) +{ + const struct usb_audio_streaming_type1_descriptor *a1d; + int i, j; + + *min = ULONG_MAX; + *max = 0; + for (i = 0; i < nalts; i++) { + a1d = alts[i].asf1desc; + if (alts[i].sc_busy) + continue; + if (p->hw_channels != a1d->bNrChannels) + continue; + if (p->hw_precision != a1d->bBitResolution) + continue; + if (p->hw_encoding != alts[i].encoding) + continue; + if (mode != UE_GET_DIR(alts[i].edesc->bEndpointAddress)) + continue; + if (a1d->bSamFreqType == UA_SAMP_CONTNUOUS) { + DPRINTFN(2,("uaudio_get_minmax_rates: cont %d-%d\n", + UA_SAMP_LO(a1d), UA_SAMP_HI(a1d))); + if (UA_SAMP_LO(a1d) < *min) + *min = UA_SAMP_LO(a1d); + if (UA_SAMP_HI(a1d) > *max) + *max = UA_SAMP_HI(a1d); + } else { + for (j = 0; j < a1d->bSamFreqType; j++) { + DPRINTFN(2,("uaudio_get_minmax_rates: disc #%d: %d\n", + j, UA_GETSAMP(a1d, j))); + if (UA_GETSAMP(a1d, j) < *min) + *min = UA_GETSAMP(a1d, j); + if (UA_GETSAMP(a1d, j) > *max) + *max = UA_GETSAMP(a1d, j); + } + } + } +} + +Static int +uaudio_match_alt_sub(int nalts, const struct as_info *alts, + const struct audio_params *p, int mode, u_long rate) +{ + const struct usb_audio_streaming_type1_descriptor *a1d; + int i, j; + + DPRINTF(("uaudio_match_alt_sub: search for %luHz %dch\n", + rate, p->hw_channels)); + for (i = 0; i < nalts; i++) { + a1d = alts[i].asf1desc; + if (alts[i].sc_busy) + continue; + if (p->hw_channels != a1d->bNrChannels) + continue; + if (p->hw_precision != a1d->bBitResolution) + continue; + if (p->hw_encoding != alts[i].encoding) + continue; + if (mode != UE_GET_DIR(alts[i].edesc->bEndpointAddress)) + continue; + if (a1d->bSamFreqType == UA_SAMP_CONTNUOUS) { + DPRINTFN(3,("uaudio_match_alt_sub: cont %d-%d\n", + UA_SAMP_LO(a1d), UA_SAMP_HI(a1d))); + if (UA_SAMP_LO(a1d) <= rate && rate <= UA_SAMP_HI(a1d)) + return i; + } else { + for (j = 0; j < a1d->bSamFreqType; j++) { + DPRINTFN(3,("uaudio_match_alt_sub: disc #%d: %d\n", + j, UA_GETSAMP(a1d, j))); + /* XXX allow for some slack */ + if (UA_GETSAMP(a1d, j) == rate) + return i; + } + } + } + return -1; +} + +Static int +uaudio_match_alt_chan(int nalts, const struct as_info *alts, + struct audio_params *p, int mode) +{ + int i, n; + u_long min, max; + u_long rate; + + /* Exact match */ + DPRINTF(("uaudio_match_alt_chan: examine %ldHz %dch %dbit.\n", + p->sample_rate, p->hw_channels, p->hw_precision)); + i = uaudio_match_alt_sub(nalts, alts, p, mode, p->sample_rate); + if (i >= 0) + return i; + + uaudio_get_minmax_rates(nalts, alts, p, mode, &min, &max); + DPRINTF(("uaudio_match_alt_chan: min=%lu max=%lu\n", min, max)); + if (max <= 0) + return -1; + /* Search for biggers */ + n = 2; + while ((rate = p->sample_rate * n++) <= max) { + i = uaudio_match_alt_sub(nalts, alts, p, mode, rate); + if (i >= 0) { + p->hw_sample_rate = rate; + return i; + } + } + if (p->sample_rate >= min) { + i = uaudio_match_alt_sub(nalts, alts, p, mode, max); + if (i >= 0) { + p->hw_sample_rate = max; + return i; + } + } else { + i = uaudio_match_alt_sub(nalts, alts, p, mode, min); + if (i >= 0) { + p->hw_sample_rate = min; + return i; + } + } + return -1; +} + +Static int +uaudio_match_alt(int nalts, const struct as_info *alts, + struct audio_params *p, int mode) +{ + int i, n; + + mode = mode == AUMODE_PLAY ? UE_DIR_OUT : UE_DIR_IN; + i = uaudio_match_alt_chan(nalts, alts, p, mode); + if (i >= 0) + return i; + + for (n = p->channels + 1; n <= AUDIO_MAX_CHANNELS; n++) { + p->hw_channels = n; + i = uaudio_match_alt_chan(nalts, alts, p, mode); + if (i >= 0) + return i; + } + + if (p->channels != 2) + return -1; + p->hw_channels = 1; + return uaudio_match_alt_chan(nalts, alts, p, mode); +} + +Static int uaudio_set_params(void *addr, int setmode, int usemode, struct audio_params *play, struct audio_params *rec) { struct uaudio_softc *sc = addr; int flags = sc->sc_altflags; int factor; - int enc, i, j; + int enc, i; + int paltidx=-1, raltidx=-1; void (*swcode)(void *, u_char *buf, int cnt); struct audio_params *p; int mode; @@ -2378,156 +3322,181 @@ uaudio_set_params(void *addr, int setmod if (sc->sc_dying) return (EIO); - if (sc->sc_chan.pipe != NULL) + if (((usemode & AUMODE_PLAY) && sc->sc_playchan.pipe != NULL) || + ((usemode & AUMODE_RECORD) && sc->sc_recchan.pipe != NULL)) return (EBUSY); + if ((usemode & AUMODE_PLAY) && sc->sc_playchan.altidx != -1) + sc->sc_alts[sc->sc_playchan.altidx].sc_busy = 0; + if ((usemode & AUMODE_RECORD) && sc->sc_recchan.altidx != -1) + sc->sc_alts[sc->sc_recchan.altidx].sc_busy = 0; + + /* Some uaudio devices are unidirectional. Don't try to find a + matching mode for the unsupported direction. */ + setmode &= sc->sc_mode; + for (mode = AUMODE_RECORD; mode != -1; mode = mode == AUMODE_RECORD ? AUMODE_PLAY : -1) { if ((setmode & mode) == 0) continue; - if ((sc->sc_chan.dir & mode) == 0) - continue; - p = mode == AUMODE_PLAY ? play : rec; + p = (mode == AUMODE_PLAY) ? play : rec; factor = 1; swcode = 0; enc = p->encoding; switch (enc) { case AUDIO_ENCODING_SLINEAR_BE: - if (p->precision == 16) { + /* FALLTHROUGH */ + case AUDIO_ENCODING_SLINEAR_LE: + if (enc == AUDIO_ENCODING_SLINEAR_BE + && p->precision == 16 && (flags & HAS_16)) { swcode = swap_bytes; enc = AUDIO_ENCODING_SLINEAR_LE; - } else if (p->precision == 8 && !(flags & HAS_8)) { - swcode = change_sign8; - enc = AUDIO_ENCODING_ULINEAR_LE; - } - break; - case AUDIO_ENCODING_SLINEAR_LE: - if (p->precision == 8 && !(flags & HAS_8)) { - swcode = change_sign8; - enc = AUDIO_ENCODING_ULINEAR_LE; + } else if (p->precision == 8) { + if (flags & HAS_8) { + /* No conversion */ + } else if (flags & HAS_8U) { + swcode = change_sign8; + enc = AUDIO_ENCODING_ULINEAR_LE; + } else if (flags & HAS_16) { + factor = 2; + p->hw_precision = 16; + if (mode == AUMODE_PLAY) + swcode = linear8_to_linear16_le; + else + swcode = linear16_to_linear8_le; + } } break; case AUDIO_ENCODING_ULINEAR_BE: + /* FALLTHROUGH */ + case AUDIO_ENCODING_ULINEAR_LE: if (p->precision == 16) { - if (mode == AUMODE_PLAY) + if (enc == AUDIO_ENCODING_ULINEAR_LE) + swcode = change_sign16_le; + else if (mode == AUMODE_PLAY) swcode = swap_bytes_change_sign16_le; else swcode = change_sign16_swap_bytes_le; enc = AUDIO_ENCODING_SLINEAR_LE; - } else if (p->precision == 8 && !(flags & HAS_8U)) { - swcode = change_sign8; - enc = AUDIO_ENCODING_SLINEAR_LE; - } - break; - case AUDIO_ENCODING_ULINEAR_LE: - if (p->precision == 16) { - swcode = change_sign16_le; - enc = AUDIO_ENCODING_SLINEAR_LE; - } else if (p->precision == 8 && !(flags & HAS_8U)) { - swcode = change_sign8; - enc = AUDIO_ENCODING_SLINEAR_LE; - } - break; - case AUDIO_ENCODING_ULAW: - if (!(flags & HAS_MULAW)) { - if (mode == AUMODE_PLAY && - (flags & HAS_16)) { - swcode = mulaw_to_slinear16_le; - factor = 2; - enc = AUDIO_ENCODING_SLINEAR_LE; - } else if (flags & HAS_8U) { - if (mode == AUMODE_PLAY) - swcode = mulaw_to_ulinear8; - else - swcode = ulinear8_to_mulaw; - enc = AUDIO_ENCODING_ULINEAR_LE; + } else if (p->precision == 8) { + if (flags & HAS_8U) { + /* No conversion */ } else if (flags & HAS_8) { - if (mode == AUMODE_PLAY) - swcode = mulaw_to_slinear8; - else - swcode = slinear8_to_mulaw; + swcode = change_sign8; enc = AUDIO_ENCODING_SLINEAR_LE; - } else - return (EINVAL); - } - break; - case AUDIO_ENCODING_ALAW: - if (!(flags & HAS_ALAW)) { - if (mode == AUMODE_PLAY && - (flags & HAS_16)) { - swcode = alaw_to_slinear16_le; + } else if (flags & HAS_16) { factor = 2; + p->hw_precision = 16; enc = AUDIO_ENCODING_SLINEAR_LE; - } else if (flags & HAS_8U) { if (mode == AUMODE_PLAY) - swcode = alaw_to_ulinear8; - else - swcode = ulinear8_to_alaw; - enc = AUDIO_ENCODING_ULINEAR_LE; - } else if (flags & HAS_8) { - if (mode == AUMODE_PLAY) - swcode = alaw_to_slinear8; + swcode = ulinear8_to_slinear16_le; else - swcode = slinear8_to_alaw; - enc = AUDIO_ENCODING_SLINEAR_LE; - } else - return (EINVAL); + swcode = slinear16_to_ulinear8_le; + } } break; + case AUDIO_ENCODING_ULAW: + if (flags & HAS_MULAW) + break; + if (flags & HAS_16) { + if (mode == AUMODE_PLAY) + swcode = mulaw_to_slinear16_le; + else + swcode = slinear16_to_mulaw_le; + factor = 2; + enc = AUDIO_ENCODING_SLINEAR_LE; + p->hw_precision = 16; + } else if (flags & HAS_8U) { + if (mode == AUMODE_PLAY) + swcode = mulaw_to_ulinear8; + else + swcode = ulinear8_to_mulaw; + enc = AUDIO_ENCODING_ULINEAR_LE; + } else if (flags & HAS_8) { + if (mode == AUMODE_PLAY) + swcode = mulaw_to_slinear8; + else + swcode = slinear8_to_mulaw; + enc = AUDIO_ENCODING_SLINEAR_LE; + } else + return (EINVAL); + break; + case AUDIO_ENCODING_ALAW: + if (flags & HAS_ALAW) + break; + if (mode == AUMODE_PLAY && (flags & HAS_16)) { + swcode = alaw_to_slinear16_le; + factor = 2; + enc = AUDIO_ENCODING_SLINEAR_LE; + p->hw_precision = 16; + } else if (flags & HAS_8U) { + if (mode == AUMODE_PLAY) + swcode = alaw_to_ulinear8; + else + swcode = ulinear8_to_alaw; + enc = AUDIO_ENCODING_ULINEAR_LE; + } else if (flags & HAS_8) { + if (mode == AUMODE_PLAY) + swcode = alaw_to_slinear8; + else + swcode = slinear8_to_alaw; + enc = AUDIO_ENCODING_SLINEAR_LE; + } else + return (EINVAL); + break; default: return (EINVAL); } /* XXX do some other conversions... */ DPRINTF(("uaudio_set_params: chan=%d prec=%d enc=%d rate=%ld\n", - p->channels, p->precision, enc, p->sample_rate)); + p->channels, p->hw_precision, enc, p->sample_rate)); - for (i = 0; i < sc->sc_nalts; i++) { - struct usb_audio_streaming_type1_descriptor *a1d = - sc->sc_alts[i].asf1desc; - if (p->channels == a1d->bNrChannels && - p->precision == a1d->bBitResolution && - enc == sc->sc_alts[i].encoding && - (mode == AUMODE_PLAY ? UE_DIR_OUT : UE_DIR_IN) == - UE_GET_DIR(sc->sc_alts[i].edesc->bEndpointAddress)) { - if (a1d->bSamFreqType == UA_SAMP_CONTNUOUS) { - DPRINTFN(2,("uaudio_set_params: cont %d-%d\n", - UA_SAMP_LO(a1d), UA_SAMP_HI(a1d))); - if (UA_SAMP_LO(a1d) < p->sample_rate && - p->sample_rate < UA_SAMP_HI(a1d)) - goto found; - } else { - for (j = 0; j < a1d->bSamFreqType; j++) { - DPRINTFN(2,("uaudio_set_params: disc #" - "%d: %d\n", j, UA_GETSAMP(a1d, j))); - /* XXX allow for some slack */ - if (UA_GETSAMP(a1d, j) == - p->sample_rate) - goto found; - } - } - } - } - return (EINVAL); + p->hw_encoding = enc; + i = uaudio_match_alt(sc->sc_nalts, sc->sc_alts, p, mode); + if (i < 0) + return (EINVAL); - found: p->sw_code = swcode; p->factor = factor; - if (usemode == mode) - sc->sc_curaltidx = i; + + if (mode == AUMODE_PLAY) + paltidx = i; + else + raltidx = i; } - DPRINTF(("uaudio_set_params: use altidx=%d, altno=%d\n", - sc->sc_curaltidx, - sc->sc_alts[sc->sc_curaltidx].idesc->bAlternateSetting)); - + if ((setmode & AUMODE_PLAY)) { + /* XXX abort transfer if currently happening? */ + uaudio_chan_init(&sc->sc_playchan, paltidx, play, 0); + } + if ((setmode & AUMODE_RECORD)) { + /* XXX abort transfer if currently happening? */ + uaudio_chan_init(&sc->sc_recchan, raltidx, rec, + UGETW(sc->sc_alts[raltidx].edesc->wMaxPacketSize)); + } + + if ((usemode & AUMODE_PLAY) && sc->sc_playchan.altidx != -1) + sc->sc_alts[sc->sc_playchan.altidx].sc_busy = 1; + if ((usemode & AUMODE_RECORD) && sc->sc_recchan.altidx != -1) + sc->sc_alts[sc->sc_recchan.altidx].sc_busy = 1; + + DPRINTF(("uaudio_set_params: use altidx=p%d/r%d, altno=p%d/r%d\n", + sc->sc_playchan.altidx, sc->sc_recchan.altidx, + (sc->sc_playchan.altidx >= 0) + ?sc->sc_alts[sc->sc_playchan.altidx].idesc->bAlternateSetting + : -1, + (sc->sc_recchan.altidx >= 0) + ? sc->sc_alts[sc->sc_recchan.altidx].idesc->bAlternateSetting + : -1)); + return (0); } #endif /* NetBSD or OpenBSD */ -usbd_status +Static usbd_status uaudio_set_speed(struct uaudio_softc *sc, int endpt, u_int speed) { usb_device_request_t req; @@ -2543,14 +3512,14 @@ uaudio_set_speed(struct uaudio_softc *sc data[1] = speed >> 8; data[2] = speed >> 16; - return (usbd_do_request(sc->sc_udev, &req, &data)); + return (usbd_do_request(sc->sc_udev, &req, data)); } #if defined(__FreeBSD__) /************************************************************/ -void -uaudio_init_params(struct uaudio_softc *sc, struct chan *ch) +int +uaudio_init_params(struct uaudio_softc *sc, struct chan *ch, int mode) { int i, j, enc; int samples_per_frame, sample_size; @@ -2601,12 +3570,13 @@ uaudio_init_params(struct uaudio_softc * } /* for (mode = ...... */ +/*But this function is used for output only */ for (i = 0; i < sc->sc_nalts; i++) { - struct usb_audio_streaming_type1_descriptor *a1d = + const struct usb_audio_streaming_type1_descriptor *a1d = sc->sc_alts[i].asf1desc; if (ch->channels == a1d->bNrChannels && ch->precision == a1d->bBitResolution && -#if 1 +#if 0 enc == sc->sc_alts[i].encoding) { #else enc == sc->sc_alts[i].encoding && @@ -2618,7 +3588,10 @@ uaudio_init_params(struct uaudio_softc * UA_SAMP_LO(a1d), UA_SAMP_HI(a1d))); if (UA_SAMP_LO(a1d) < ch->sample_rate && ch->sample_rate < UA_SAMP_HI(a1d)) { - sc->sc_curaltidx = i; + if (mode == AUMODE_PLAY) + sc->sc_playchan.altidx = i; + else + sc->sc_recchan.altidx = i; goto found; } } else { @@ -2628,7 +3601,10 @@ uaudio_init_params(struct uaudio_softc * /* XXX allow for some slack */ if (UA_GETSAMP(a1d, j) == ch->sample_rate) { - sc->sc_curaltidx = i; + if (mode == AUMODE_PLAY) + sc->sc_playchan.altidx = i; + else + sc->sc_recchan.altidx = i; goto found; } } @@ -2636,6 +3612,8 @@ uaudio_init_params(struct uaudio_softc * } } /* return (EINVAL); */ + printf("uaudio: This device can't play in rate=%d.\n", ch->sample_rate); + return (-1); found: #if 0 /* XXX */ @@ -2656,6 +3634,7 @@ uaudio_init_params(struct uaudio_softc * ch->cur = ch->start; ch->transferred = 0; ch->curchanbuf = 0; + return (0); } void @@ -2666,7 +3645,7 @@ uaudio_query_formats(device_t dev, u_int u_int32_t fmt; struct uaudio_softc *sc; - struct usb_audio_streaming_type1_descriptor *a1d; + const struct usb_audio_streaming_type1_descriptor *a1d; sc = device_get_softc(dev); @@ -2739,13 +3718,20 @@ uaudio_query_formats(device_t dev, u_int void uaudio_chan_set_param_pcm_dma_buff(device_t dev, u_char *start, u_char *end, - struct pcm_channel *pc) + struct pcm_channel *pc, int dir) { struct uaudio_softc *sc; struct chan *ch; sc = device_get_softc(dev); - ch = &sc->sc_chan; +#ifndef NO_RECORDING + if (dir == PCMDIR_PLAY) + ch = &sc->sc_playchan; + else + ch = &sc->sc_recchan; +#else + ch = &sc->sc_playchan; +#endif ch->start = start; ch->end = end; @@ -2756,13 +3742,20 @@ uaudio_chan_set_param_pcm_dma_buff(devic } void -uaudio_chan_set_param_blocksize(device_t dev, u_int32_t blocksize) +uaudio_chan_set_param_blocksize(device_t dev, u_int32_t blocksize, int dir) { struct uaudio_softc *sc; struct chan *ch; sc = device_get_softc(dev); - ch = &sc->sc_chan; +#ifndef NO_RECORDING + if (dir == PCMDIR_PLAY) + ch = &sc->sc_playchan; + else + ch = &sc->sc_recchan; +#else + ch = &sc->sc_playchan; +#endif ch->blksize = blocksize; @@ -2770,13 +3763,20 @@ uaudio_chan_set_param_blocksize(device_t } void -uaudio_chan_set_param_speed(device_t dev, u_int32_t speed) +uaudio_chan_set_param_speed(device_t dev, u_int32_t speed, int dir) { struct uaudio_softc *sc; struct chan *ch; sc = device_get_softc(dev); - ch = &sc->sc_chan; +#ifndef NO_RECORDING + if (dir == PCMDIR_PLAY) + ch = &sc->sc_playchan; + else + ch = &sc->sc_recchan; +#else + ch = &sc->sc_playchan; +#endif ch->sample_rate = speed; @@ -2784,14 +3784,21 @@ uaudio_chan_set_param_speed(device_t dev } int -uaudio_chan_getptr(device_t dev) +uaudio_chan_getptr(device_t dev, int dir) { struct uaudio_softc *sc; struct chan *ch; int ptr; sc = device_get_softc(dev); - ch = &sc->sc_chan; +#ifndef NO_RECORDING + if (dir == PCMDIR_PLAY) + ch = &sc->sc_playchan; + else + ch = &sc->sc_recchan; +#else + ch = &sc->sc_playchan; +#endif ptr = ch->cur - ch->start; @@ -2799,13 +3806,20 @@ uaudio_chan_getptr(device_t dev) } void -uaudio_chan_set_param_format(device_t dev, u_int32_t format) +uaudio_chan_set_param_format(device_t dev, u_int32_t format, int dir) { struct uaudio_softc *sc; struct chan *ch; sc = device_get_softc(dev); - ch = &sc->sc_chan; +#ifndef NO_RECORDING + if (dir == PCMDIR_PLAY) + ch = &sc->sc_playchan; + else + ch = &sc->sc_recchan; +#else + ch = &sc->sc_playchan; +#endif ch->format = format; @@ -2820,14 +3834,14 @@ uaudio_halt_out_dma(device_t dev) sc = device_get_softc(dev); DPRINTF(("uaudio_halt_out_dma: enter\n")); - if (sc->sc_chan.pipe != NULL) { - uaudio_chan_close(sc, &sc->sc_chan); - sc->sc_chan.pipe = 0; - uaudio_chan_free_buffers(sc, &sc->sc_chan); + if (sc->sc_playchan.pipe != NULL) { + uaudio_chan_close(sc, &sc->sc_playchan); + sc->sc_playchan.pipe = 0; + uaudio_chan_free_buffers(sc, &sc->sc_playchan); } return (0); } - + int uaudio_trigger_output(device_t dev) { @@ -2837,12 +3851,13 @@ uaudio_trigger_output(device_t dev) int i, s; sc = device_get_softc(dev); - ch = &sc->sc_chan; + ch = &sc->sc_playchan; if (sc->sc_dying) return (EIO); - uaudio_init_params(sc, ch); + if (uaudio_init_params(sc, ch, AUMODE_PLAY)) + return (EIO); err = uaudio_chan_alloc_buffers(sc, ch); if (err) --- src/sys/dev/sound/usb/uaudio.h Mon Dec 20 01:48:43 2004 +++ src/sys/dev/sound/usb/uaudio-91.h Mon Dec 20 01:56:58 2004 @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/sound/usb/uaudio.h,v 1.1 2002/07/21 17:28:50 nsayer Exp $ */ +/* $FreeBSD: src/sys/dev/sound/usb/uaudio-91.h,v $ */ /* * Copyright (c) 2000-2002 Hiroyuki Aizu @@ -30,7 +30,7 @@ /* Defined in uaudio.c, used in uaudio_pcm,c */ void uaudio_chan_set_param_pcm_dma_buff(device_t dev, u_char *start, - u_char *end, struct pcm_channel *pc); + u_char *end, struct pcm_channel *pc, int dir); int uaudio_trigger_output(device_t dev); int uaudio_halt_out_dma(device_t dev); #ifndef NO_RECORDING @@ -38,12 +38,11 @@ int uaudio_trigger_input(device_t dev); int uaudio_halt_in_dma(device_t dev); #endif void uaudio_chan_set_param(device_t, u_char *, u_char *); -void uaudio_chan_set_param_blocksize(device_t dev, u_int32_t blocksize); -void uaudio_chan_set_param_speed(device_t dev, u_int32_t speed); -void uaudio_chan_set_param_format(device_t dev, u_int32_t format); -int uaudio_chan_getptr(device_t dev); +void uaudio_chan_set_param_blocksize(device_t dev, u_int32_t blocksize, int dir); +void uaudio_chan_set_param_speed(device_t dev, u_int32_t speed, int dir); +void uaudio_chan_set_param_format(device_t dev, u_int32_t format,int dir); +int uaudio_chan_getptr(device_t dev, int); void uaudio_mixer_set(device_t dev, unsigned type, unsigned left, unsigned right); u_int32_t uaudio_query_mix_info(device_t dev); void uaudio_query_formats(device_t dev, u_int32_t *pfmt, u_int32_t *rfmt); - --- src/sys/dev/sound/usb/uaudioreg.h Mon Dec 20 01:48:43 2004 +++ src/sys/dev/sound/usb/uaudioreg-91.h Mon Dec 20 01:57:15 2004 @@ -1,5 +1,5 @@ -/* $NetBSD: uaudioreg.h,v 1.7 2000/12/28 00:29:58 augustss Exp $ */ -/* $FreeBSD: src/sys/dev/sound/usb/uaudioreg.h,v 1.2 2002/11/06 21:37:21 joe Exp $ */ +/* $NetBSD: uaudioreg.h,v 1.12 2004/11/05 19:08:29 kent Exp $ */ +/* $FreeBSD: src/sys/dev/sound/usb/uaudioreg-91.h,v $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -40,7 +40,6 @@ #define UAUDIO_VERSION 0x100 -#define UDESC_CS_DEVICE 0x21 #define UDESC_CS_CONFIG 0x22 #define UDESC_CS_STRING 0x23 #define UDESC_CS_INTERFACE 0x24 @@ -63,7 +62,7 @@ typedef struct { uByte bmAttributes; uWord wMaxPacketSize; uByte bInterval; - /* + /* * The following two entries are only used by the Audio Class. * And according to the specs the Audio Class is the only one * allowed to extend the endpoint descriptor. @@ -98,6 +97,9 @@ struct usb_audio_streaming_endpoint_desc uByte bDescriptorType; uByte bDescriptorSubtype; uByte bmAttributes; +#define UA_SED_FREQ_CONTROL 0x01 +#define UA_SED_PITCH_CONTROL 0x02 +#define UA_SED_MAXPACKETSONLY 0x80 uByte bLockDelayUnits; uWord wLockDelay; } UPACKED; @@ -121,9 +123,29 @@ struct usb_audio_streaming_type1_descrip struct usb_audio_cluster { uByte bNrChannels; uWord wChannelConfig; +#define UA_CHANNEL_LEFT 0x0001 +#define UA_CHANNEL_RIGHT 0x0002 +#define UA_CHANNEL_CENTER 0x0004 +#define UA_CHANNEL_LFE 0x0008 +#define UA_CHANNEL_L_SURROUND 0x0010 +#define UA_CHANNEL_R_SURROUND 0x0020 +#define UA_CHANNEL_L_CENTER 0x0040 +#define UA_CHANNEL_R_CENTER 0x0080 +#define UA_CHANNEL_SURROUND 0x0100 +#define UA_CHANNEL_L_SIDE 0x0200 +#define UA_CHANNEL_R_SIDE 0x0400 +#define UA_CHANNEL_TOP 0x0800 uByte iChannelNames; } UPACKED; +/* Shared by all units and terminals */ +struct usb_audio_unit { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bUnitId; +}; + /* UDESCSUB_AC_INPUT */ struct usb_audio_input_terminal { uByte bLength; @@ -340,8 +362,11 @@ struct usb_audio_extension_unit_1 { #define UA_FMT_IEEE_FLOAT 3 #define UA_FMT_ALAW 4 #define UA_FMT_MULAW 5 +#define UA_FMT_MPEG 0x1001 +#define UA_FMT_AC3 0x1002 -#define SAMPLING_FREQ_CONTROL 0x01 +#define SAMPLING_FREQ_CONTROL 0x01 +#define PITCH_CONTROL 0x02 #define FORMAT_TYPE_UNDEFINED 0 #define FORMAT_TYPE_I 1 @@ -377,4 +402,3 @@ struct usb_audio_extension_unit_1 { #define DR_THRESHOLD_CONTROL 4 #define DR_ATTACK_TIME_CONTROL 5 #define DR_RELEASE_TIME_CONTROL 6 - --- src/sys/dev/sound/usb/uaudio_pcm.c Mon Dec 20 01:48:43 2004 +++ src/sys/dev/sound/usb/uaudio_pcm-91.c Mon Dec 20 01:57:07 2004 @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/sound/usb/uaudio_pcm.c,v 1.5 2004/07/16 03:58:57 tanimura Exp $ */ +/* $FreeBSD: src/sys/dev/sound/usb/uaudio_pcm-91.c,v $ */ /* * Copyright (c) 2000-2002 Hiroyuki Aizu @@ -89,7 +89,7 @@ ua_chan_init(kobj_t obj, void *devinfo, buf = end = sndbuf_getbuf(b); end += sndbuf_getsize(b); - uaudio_chan_set_param_pcm_dma_buff(pa_dev, buf, end, ch->channel); + uaudio_chan_set_param_pcm_dma_buff(pa_dev, buf, end, ch->channel, dir); ch->dir = dir; #ifndef NO_RECORDING @@ -113,7 +113,7 @@ ua_chan_setformat(kobj_t obj, void *data ua = ch->parent; pa_dev = device_get_parent(ua->sc_dev); - uaudio_chan_set_param_format(pa_dev, format); + uaudio_chan_set_param_format(pa_dev, format, ch->dir); ch->fmt = format; return 0; @@ -130,7 +130,7 @@ ua_chan_setspeed(kobj_t obj, void *data, ua = ch->parent; pa_dev = device_get_parent(ua->sc_dev); - uaudio_chan_set_param_speed(pa_dev, speed); + uaudio_chan_set_param_speed(pa_dev, speed, ch->dir); return ch->spd; } @@ -151,7 +151,7 @@ ua_chan_setblocksize(kobj_t obj, void *d /* XXXXX */ ua = ch->parent; pa_dev = device_get_parent(ua->sc_dev); - uaudio_chan_set_param_blocksize(pa_dev, blocksize); + uaudio_chan_set_param_blocksize(pa_dev, blocksize, ch->dir); return ch->blksz; } @@ -198,7 +198,7 @@ ua_chan_getptr(kobj_t obj, void *data) ua = ch->parent; pa_dev = device_get_parent(ua->sc_dev); - return uaudio_chan_getptr(pa_dev); + return uaudio_chan_getptr(pa_dev, ch->dir); } static struct pcmchan_caps * --- F_41-91.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 19 19:40:07 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7356616A4CE for ; Sun, 19 Dec 2004 19:40:07 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2AA8C43D53 for ; Sun, 19 Dec 2004 19:40:07 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJJe7uM008352 for ; Sun, 19 Dec 2004 19:40:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJJe6XI008351; Sun, 19 Dec 2004 19:40:07 GMT (envelope-from gnats) Resent-Date: Sun, 19 Dec 2004 19:40:07 GMT Resent-Message-Id: <200412191940.iBJJe6XI008351@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Kazuhito HONDA Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1731E16A4CE for ; Sun, 19 Dec 2004 19:39:58 +0000 (GMT) Received: from t-mta2.odn.ne.jp (mfep2.odn.ne.jp [143.90.131.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4250F43D2D for ; Sun, 19 Dec 2004 19:39:57 +0000 (GMT) (envelope-from kazuhito@ph.noda.tus.ac.jp) Received: from localhost ([61.116.129.10]) by t-mta2.odn.ne.jp with ESMTP id <20041219193956295.NFHI.481886.t-mta2.odn.ne.jp@mta2.odn.ne.jp>; Mon, 20 Dec 2004 04:39:56 +0900 Message-Id: <20041220.043955.730548982.kazuhito@ph.noda.tus.ac.jp> Date: Mon, 20 Dec 2004 04:39:55 +0900 (JST) From: Kazuhito HONDA To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: kazuhito@ph.noda.tus.ac.jp Subject: kern/75276: Volumes of USB audio can be controlled separately (uaudio) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Kazuhito HONDA List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 19:40:07 -0000 >Number: 75276 >Category: kern >Synopsis: Volumes of USB audio can be controlled separately (uaudio) >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Dec 19 19:40:06 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Kazuhito HONDA >Release: FreeBSD 6.0-CURRENT i386 >Organization: >Environment: System: FreeBSD kaoru 6.0-CURRENT FreeBSD 6.0-CURRENT #192: Mon Dec 20 03:46:53 JST 2004 root@kaoru:/usr/obj/src/sys/i386/compile/KAORU.6.0B.0 i386 USB audio device: Sound Blaster Digital Music (SBDM, Creative Labs.) >Description: My SBDM has 6 feature descriptors and can be change 5 volumes separately (one feature descriptor has mute only).those are volumes, from line to output, from line to record, from mic to output, from mic to record and to speaker. But FreeBSD recognize only: Mixer pcm is currently set to 75:75 >How-To-Repeat: >Fix: At first, you must apply the patch of kern/75274. After that, apply the patch below. When This patch was applied, FreeBSD recognize SBDM's volumes as Mixer speaker is currently set to 75:75 Mixer line is currently set to 75:75 Mixer mic is currently set to 0:0 In this case, two volumes from line to output and record, and two volumes from mic to output and to record, share "Mixer line" and "Mixer mic", respectively. It is difficult to separate these sharing in FreeBSD sound system. --- F_m.diff begins here --- --- src/sys/dev/sound/usb/uaudio-91.c Mon Dec 20 02:42:53 2004 +++ src/sys/dev/sound/usb/uaudio-91-m.c Mon Dec 20 03:51:36 2004 @@ -1,5 +1,5 @@ /* $NetBSD: uaudio.c,v 1.91 2004/11/05 17:46:14 kent Exp $ */ -/* $FreeBSD: src/sys/dev/sound/usb/uaudio-91.c,v $: */ +/* $FreeBSD: src/sys/dev/sound/usb/uaudio-91-m.c,v $: */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -144,8 +144,9 @@ struct mixerctl { u_int mul; #if defined(__FreeBSD__) /* XXXXX */ unsigned ctl; -#else +#endif u_int8_t class; +#if !defined(__FreeBSD__) char ctlname[MAX_AUDIO_DEV_LEN]; char *ctlunit; #endif @@ -263,13 +264,17 @@ struct io_terminal { #define UAC_EQUAL 2 #define UAC_RECORD 3 #define UAC_NCLASSES 4 -#if !defined(__FreeBSD__) #ifdef USB_DEBUG +#if defined(__FreeBSD__) +#define AudioCinputs "inputs" +#define AudioCoutputs "outputs" +#define AudioCrecord "record" +#define AudioCequalization "equalization" +#endif Static const char *uac_names[] = { AudioCoutputs, AudioCinputs, AudioCequalization, AudioCrecord, }; #endif -#endif Static usbd_status uaudio_identify_ac (struct uaudio_softc *, const usb_config_descriptor_t *); @@ -307,9 +312,12 @@ Static void uaudio_add_selector #ifdef USB_DEBUG Static const char *uaudio_get_terminal_name(int); #endif -#if !defined(__FreeBSD__) Static int uaudio_determine_class (const struct io_terminal *, struct mixerctl *); +#if defined(__FreeBSD__) +Static const int uaudio_feature_name(const struct io_terminal *, + struct mixerctl *); +#else Static const char *uaudio_feature_name (const struct io_terminal *, struct mixerctl *); #endif @@ -738,7 +746,14 @@ uaudio_mixer_add_ctl(struct uaudio_softc size_t len; struct mixerctl *nmc; -#if !defined(__FreeBSD__) +#if defined(__FreeBSD__) + if (mc->class < UAC_NCLASSES) { + DPRINTF(("%s: adding %s.%d\n", + __func__, uac_names[mc->class], mc->ctl)); + } else { + DPRINTF(("%s: adding %d\n", __func__, mc->ctl)); + } +#else if (mc->class < UAC_NCLASSES) { DPRINTF(("%s: adding %s.%s\n", __func__, uac_names[mc->class], mc->ctlname)); @@ -947,9 +962,7 @@ uaudio_add_mixer(struct uaudio_softc *sc bm = d1->bmControls; mix.wIndex = MAKE(d->bUnitId, sc->sc_ac_iface); -#if !defined(__FreeBSD__) uaudio_determine_class(&iot[id], &mix); -#endif mix.type = MIX_SIGNED_16; #if !defined(__FreeBSD__) /* XXXXX */ mix.ctlunit = AudioNvolume; @@ -1107,7 +1120,6 @@ uaudio_get_terminal_name(int terminal_ty } #endif -#if !defined(__FreeBSD__) Static int uaudio_determine_class(const struct io_terminal *iot, struct mixerctl *mix) { @@ -1158,6 +1170,108 @@ uaudio_determine_class(const struct io_t return terminal_type; } +#if defined(__FreeBSD__) +const int +uaudio_feature_name(const struct io_terminal *iot, struct mixerctl *mix) +{ + int terminal_type; + + terminal_type = uaudio_determine_class(iot, mix); + if (mix->class == UAC_RECORD && terminal_type == 0) + return SOUND_MIXER_IMIX; + DPRINTF(("%s: terminal_type=%s\n", __func__, + uaudio_get_terminal_name(terminal_type))); + switch (terminal_type) { + case UAT_STREAM: + return SOUND_MIXER_PCM; + + case UATI_MICROPHONE: + case UATI_DESKMICROPHONE: + case UATI_PERSONALMICROPHONE: + case UATI_OMNIMICROPHONE: + case UATI_MICROPHONEARRAY: + case UATI_PROCMICROPHONEARR: + return SOUND_MIXER_MIC; + + case UATO_SPEAKER: + case UATO_DESKTOPSPEAKER: + case UATO_ROOMSPEAKER: + case UATO_COMMSPEAKER: + return SOUND_MIXER_SPEAKER; + + case UATE_ANALOGCONN: + case UATE_LINECONN: + case UATE_LEGACYCONN: + return SOUND_MIXER_LINE; + + case UATE_DIGITALAUIFC: + case UATE_SPDIF: + case UATE_1394DA: + case UATE_1394DV: + return SOUND_MIXER_ALTPCM; + + case UATF_CDPLAYER: + return SOUND_MIXER_CD; + + case UATF_SYNTHESIZER: + return SOUND_MIXER_SYNTH; + + case UATF_VIDEODISCAUDIO: + case UATF_DVDAUDIO: + case UATF_TVTUNERAUDIO: + return SOUND_MIXER_VIDEO; + +/* telephony terminal types */ + case UATT_UNDEFINED: + case UATT_PHONELINE: + case UATT_TELEPHONE: + case UATT_DOWNLINEPHONE: + return SOUND_MIXER_PHONEIN; +/* return SOUND_MIXER_PHONEOUT;*/ + + case UATF_RADIORECV: + case UATF_RADIOXMIT: + return SOUND_MIXER_RADIO; + + case UAT_UNDEFINED: + case UAT_VENDOR: + case UATI_UNDEFINED: +/* output terminal types */ + case UATO_UNDEFINED: + case UATO_DISPLAYAUDIO: + case UATO_SUBWOOFER: + case UATO_HEADPHONES: +/* bidir terminal types */ + case UATB_UNDEFINED: + case UATB_HANDSET: + case UATB_HEADSET: + case UATB_SPEAKERPHONE: + case UATB_SPEAKERPHONEESUP: + case UATB_SPEAKERPHONEECANC: +/* external terminal types */ + case UATE_UNDEFINED: +/* embedded function terminal types */ + case UATF_UNDEFINED: + case UATF_CALIBNOISE: + case UATF_EQUNOISE: + case UATF_DAT: + case UATF_DCC: + case UATF_MINIDISK: + case UATF_ANALOGTAPE: + case UATF_PHONOGRAPH: + case UATF_VCRAUDIO: + case UATF_SATELLITE: + case UATF_CABLETUNER: + case UATF_DSS: + case UATF_MULTITRACK: + case 0xffff: + default: + DPRINTF(("%s: 'master' for 0x%.4x\n", __func__, terminal_type)); + return SOUND_MIXER_VOLUME; + } + return SOUND_MIXER_VOLUME; +} +#else Static const char * uaudio_feature_name(const struct io_terminal *iot, struct mixerctl *mix) { @@ -1271,7 +1385,9 @@ uaudio_add_feature(struct uaudio_softc * u_int fumask, mmask, cmask; struct mixerctl mix; int chan, ctl, i, unit; -#if !defined(__FreeBSD__) +#if defined(__FreeBSD__) + int mixernumber; +#else const char *mixername; #endif @@ -1316,7 +1432,9 @@ uaudio_add_feature(struct uaudio_softc * } #undef GET -#if !defined(__FreeBSD__) +#if defined(__FreeBSD__) + mixernumber = uaudio_feature_name(&iot[id], &mix); +#else mixername = uaudio_feature_name(&iot[id], &mix); #endif switch (ctl) { @@ -1333,8 +1451,7 @@ uaudio_add_feature(struct uaudio_softc * case VOLUME_CONTROL: mix.type = MIX_SIGNED_16; #if defined(__FreeBSD__) - /* mix.ctl = SOUND_MIXER_VOLUME; */ - mix.ctl = SOUND_MIXER_PCM; + mix.ctl = mixernumber; #else mix.ctlunit = AudioNvolume; strlcpy(mix.ctlname, mixername, sizeof(mix.ctlname)); @@ -1442,9 +1559,7 @@ uaudio_add_processing_updown(struct uaud mix.wIndex = MAKE(d->bUnitId, sc->sc_ac_iface); mix.nchan = 1; mix.wValue[0] = MAKE(UD_MODE_SELECT_CONTROL, 0); -#if !defined(__FreeBSD__) uaudio_determine_class(&iot[id], &mix); -#endif mix.type = MIX_ON_OFF; /* XXX */ #if !defined(__FreeBSD__) mix.ctlunit = ""; @@ -1475,9 +1590,7 @@ uaudio_add_processing(struct uaudio_soft mix.wIndex = MAKE(d->bUnitId, sc->sc_ac_iface); mix.nchan = 1; mix.wValue[0] = MAKE(XX_ENABLE_CONTROL, 0); -#if !defined(__FreeBSD__) uaudio_determine_class(&iot[id], &mix); -#endif mix.type = MIX_ON_OFF; #if !defined(__FreeBSD__) mix.ctlunit = ""; @@ -1523,9 +1636,7 @@ uaudio_add_extension(struct uaudio_softc mix.wIndex = MAKE(d->bUnitId, sc->sc_ac_iface); mix.nchan = 1; mix.wValue[0] = MAKE(UA_EXT_ENABLE, 0); -#if !defined(__FreeBSD__) uaudio_determine_class(&iot[id], &mix); -#endif mix.type = MIX_ON_OFF; #if !defined(__FreeBSD__) mix.ctlunit = ""; --- F_m.diff ends here --- /tmp/pbad.1LK6m3M8 >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 19 20:10:15 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 59C0916A4CE for ; Sun, 19 Dec 2004 20:10:15 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 23B3143D58 for ; Sun, 19 Dec 2004 20:10:15 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJKAE0a013166 for ; Sun, 19 Dec 2004 20:10:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJKAEml013163; Sun, 19 Dec 2004 20:10:14 GMT (envelope-from gnats) Resent-Date: Sun, 19 Dec 2004 20:10:14 GMT Resent-Message-Id: <200412192010.iBJKAEml013163@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Justin Erenkrantz Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2E4A16A4CF for ; Sun, 19 Dec 2004 20:03:15 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 910D343D1F for ; Sun, 19 Dec 2004 20:03:15 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJK3F9H065661 for ; Sun, 19 Dec 2004 20:03:15 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id iBJK3FjJ065659; Sun, 19 Dec 2004 20:03:15 GMT (envelope-from nobody) Message-Id: <200412192003.iBJK3FjJ065659@www.freebsd.org> Date: Sun, 19 Dec 2004 20:03:15 GMT From: Justin Erenkrantz To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: kern/75277: netstat -m 'mbufs in use' output appears to be incorrect X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 20:10:15 -0000 >Number: 75277 >Category: kern >Synopsis: netstat -m 'mbufs in use' output appears to be incorrect >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Dec 19 20:10:14 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Justin Erenkrantz >Release: 5.3-STABLE >Organization: Apache Software Foundation >Environment: FreeBSD ... 5.3-STABLE FreeBSD 5.3-STABLE #2: Sat Dec 18 14:54:30 PST 2004 root@...:/usr/obj/usr/src/sys/SMP i386 >Description: The 'mbufs in use' parameter from 'netstat -m' appears from to be incorrect (or non-sensical). % netstat -m 4294965753 mbufs in use 621/25600 mbuf clusters in use (current/max) 0/5/6656 sfbufs in use (current/peak/max) 871 KBytes allocated to network 0 requests for sfbufs denied 0 requests for sfbufs delayed 0 requests for I/O initiated by sendfile 34 calls to protocol drain routines We are using the em(4) driver with RELENG_5 from Dec 18th. We upgraded to RELENG_5 from 5.3-RELEASE to catch the recent em(4) updates. >How-To-Repeat: netstat -m >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-bugs@FreeBSD.ORG Mon Dec 20 11:00:44 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 059FC16A4CE for ; Mon, 20 Dec 2004 11:00:44 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B17C443D1D for ; Mon, 20 Dec 2004 11:00:43 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBKB0h62045921 for ; Mon, 20 Dec 2004 11:00:43 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBKB0h3v045919; Mon, 20 Dec 2004 11:00:43 GMT (envelope-from gnats) Resent-Date: Mon, 20 Dec 2004 11:00:43 GMT Resent-Message-Id: <200412201100.iBKB0h3v045919@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andrew Chikin Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 679A216A4CE for ; Mon, 20 Dec 2004 10:54:33 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5246E43D3F for ; Mon, 20 Dec 2004 10:54:33 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id iBKAsWFL053087 for ; Mon, 20 Dec 2004 10:54:32 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id iBKAsW22053086; Mon, 20 Dec 2004 10:54:32 GMT (envelope-from nobody) Message-Id: <200412201054.iBKAsW22053086@www.freebsd.org> Date: Mon, 20 Dec 2004 10:54:32 GMT From: Andrew Chikin To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: misc/75297: I`ve got one more via in my ipfw rule. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Dec 2004 11:00:44 -0000 >Number: 75297 >Category: misc >Synopsis: I`ve got one more via in my ipfw rule. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Dec 20 11:00:43 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Andrew Chikin >Release: 5_3_RELEASE >Organization: frnet >Environment: # uname -a FreeBSD cerber.xxx 5.3-RELEASE-p2 FreeBSD 5.3-RELEASE-p2 #1: Thu Dec 16 11:37:21 MSK 2004 root@cerber.xxx:/usr/obj/usr/src/sys/CERBER i386 >Description: #ipfw list -- ..skipped 02000 divert 8668 ip from any to any via 192.168.2.6 via ---------------------------------------------------- ^^^ 02100 tee 199 ip from any to any via rl1 ..skipped -- /etc/rc.firewall: case ${natd_enable} in [Yy][Ee][Ss]) if [ -n "${natd_interface}" ]; then ${fwcmd} add divert natd all from any to any via ${natd_interface} fi ;; esac -> # ipfw del 2000 # ipfw add 2000 divert natd all from any to any via 192.168.2.6 02000 divert 8668 ip from any to any via 192.168.2.6 via # ipfw del 2000 # ipfw add 2000 divert natd all from any to any 02000 divert 8668 ip from any to any # ipfw del 2000 # ipfw add 2000 divert natd ip from any to any via rl0 02000 divert 8668 ip from any to any via rl0 So, if the natd_interface is given in numerical form, I`ve got on more "via" in my ipfw_rule. But if natd_interface is given in alphabetic form - no problems. p.s. natd work properly in both cases. p.p.s. sorry for my english. >How-To-Repeat: # ipfw add 2000 divert natd all from any to any via 192.168.2.6 02000 divert 8668 ip from any to any via 192.168.2.6 via >Fix: no idea. use alphabetical form :) >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-bugs@FreeBSD.ORG Mon Dec 20 11:00:47 2004 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D415916A4CE for ; Mon, 20 Dec 2004 11:00:47 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9AA7043D1F for ; Mon, 20 Dec 2004 11:00:47 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBKB0lXA046015 for ; Mon, 20 Dec 2004 11:00:47 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBKB0kUq046009 for freebsd-bugs@freebsd.org; Mon, 20 Dec 2004 11:00:46 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 20 Dec 2004 11:00:46 GMT Message-Id: <200412201100.iBKB0kUq046009@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: FreeBSD bugs list Subject: open PR's (mis)filed to gnats-admin and in limbo X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Dec 2004 11:00:48 -0000 Current FreeBSD problem reports Critical problems Serious problems Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2004/12/11] docs/74952 gnats-admin [patch] Ref. to unknown option in man 1 problem total. From owner-freebsd-bugs@FreeBSD.ORG Mon Dec 20 11:00:54 2004 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A0ECE16A4CE for ; Mon, 20 Dec 2004 11:00:54 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5742843D1D for ; Mon, 20 Dec 2004 11:00:54 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBKB0sFR046026 for ; Mon, 20 Dec 2004 11:00:54 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBKB0lwu046021 for freebsd-bugs@freebsd.org; Mon, 20 Dec 2004 11:00:47 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 20 Dec 2004 11:00:47 GMT Message-Id: <200412201100.iBKB0lwu046021@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: FreeBSD bugs list Subject: Current problem reports X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Dec 2004 11:00:54 -0000 Current FreeBSD problem reports The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. Bugs can be in one of several states: o - open A problem report has been submitted, no sanity checking performed. a - analyzed The problem is understood and a solution is being sought. f - feedback Further work requires additional information from the originator or the community - possibly confirmation of the effectiveness of a proposed solution. p - patched A patch has been committed, but some issues (MFC and / or confirmation from originator) are still open. s - suspended The problem is not being worked on, due to lack of information or resources. This is a prime candidate for somebody who is looking for a project to do. If the problem cannot be solved at all, it will be closed, rather than suspended. c - closed A problem report is closed when any changes have been integrated, documented, and tested -- or when fixing the problem is abandoned. Critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- f [2000/05/09] bin/18466 qa [sysinstall] install via nfs or ftp media o [2001/02/22] ports/25272 ports-bugs Using lang/eperl as cgi/nph binary execut a [2001/05/10] kern/27250 bp [unionfs] [patch] unionfs filesystem pani p [2001/12/28] gnu/33262 mp gdb does not handle pending signals corre o [2002/06/08] kern/39043 Corrupted files on a FAT32 partition (wit o [2002/06/11] ports/39148 cy screen consumes 100% when run f [2002/08/16] kern/41723 [2TB] on 1TB fs, copying files to filesys o [2002/10/25] bin/44471 qa [sysinstall] 4.6 install writes MBR even o [2002/12/28] kern/46576 emulation FreeBSD 4.6 broke linux emulation install o [2003/02/16] bin/48341 qa [sysinstall] sysinstall deletes mbr altho o [2003/03/23] kern/50201 [twe] 3ware RAID 5 resulting in data corr o [2003/06/28] kern/53874 emulation /usr/ports/emulators/linux_base isn't wor o [2003/07/30] ports/55032 emulation java/jdk13: SVr4 emulation interferes wit o [2003/09/28] bin/57321 markm CGI.pm in 4.x base system has a cross-sit o [2003/10/06] i386/57673 i386 [disklabel] Odd/dangerous disklabel behav o [2003/11/10] kern/59103 Serious data corruption reading compact f o [2003/12/12] kern/60175 panic: 5.2-RC: disk errors cause panic in o [2003/12/17] kern/60313 data destruction: lseek() misalignment si o [2004/01/31] java/62144 phantom JVM is Crashing o [2004/01/31] java/62145 phantom HotSpot Java Virtual Machine Error : 11 o [2004/02/12] amd64/62753 obrien txp(4) panics on amd4 o [2004/02/16] i386/62902 i386 Data Corruption on Dell PE 600SC (Server o [2004/04/16] i386/65646 i386 FreeBSD suddenly turns off the power o [2004/04/22] threads/65883threads libkse's sigwait does not work after fork o [2004/04/28] i386/66039 i386 panic: system panic with file system corr o [2004/05/04] kern/66248 usb [panic] bootloader is confused by booting o [2004/05/04] bin/66261 fsck cannot recover filesystem corruption o [2004/05/11] kern/66553 rwatson SEBSD kernel compilation errors o [2004/05/27] i386/67260 i386 [boot] stack overflow after boot menu whe o [2004/07/07] kern/68757 kan rapid file creation on snapshotted filesy o [2004/08/06] kern/70096 [patch] full msdos file system causes cor o [2004/08/23] kern/70881 5.3 beta1 kernel.generic missing from /bo o [2004/09/05] i386/71395 i386 Data corrupted on Serverworks CG-SL chips o [2004/09/09] i386/71538 i386 [install] multi-homed install trashes exi o [2004/09/16] kern/71800 5.3-BETA3 crash (infinite IRQ list dump) o [2004/10/10] kern/72478 sos [patch] ata: dd destroys FreeBSD raid hea o [2004/10/21] kern/72979 unkillable process(es) stuck in `STOP' st o [2004/10/22] bin/73019 fsck_ufs: cannot alloc 607016868 bytes fo o [2004/10/27] amd64/73211 amd64 FAST_IPSEC broken on amd64 o [2004/11/06] amd64/73603 sam kernel build amd64 fails when device ath o [2004/11/19] kern/74137 FreeBSD 5.3 BTX loader stack overflows an o [2004/12/11] kern/74935 andre [patch] TCP simultaneous open fails. o [2004/12/14] amd64/75043 le Vinum panic on booting from mirrored vinu o [2004/12/18] amd64/75209 amd64 5.3-Release panics on attempted boot from 44 problems total. Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- a [1997/04/02] bin/3170 vi freaks and dump core if user doesn't e o [1997/05/07] bin/3524 imp rlogin doesn't read $HOSTALIASES for non- s [1997/10/01] bin/4672 rdist does not do hard links right when t a [1998/05/06] bin/6536 peter pppd doesn't restore drainwait for tty o [1998/06/24] i386/7057 mdodd 3Com 3C509 locks up, or has >1000ms rtt u o [1998/09/30] gnu/8099 obrien [patch] some bugs in cpio o [1998/11/11] bin/8646 Implement rlogind -a option f [1998/11/21] kern/8778 gibbs Buslogic BT948 in 2 boxes upgraded from S o [1998/11/25] kern/8861 mdodd under heavy (multi interface) traffic ep0 f [1998/11/25] bin/8865 dwmalone syslogd hangs with serial console o [1999/02/15] kern/10107 interlock situation with exec_map and a p o [1999/03/02] bin/10353 jon ypserv gets segmentation violation o [1999/03/30] kern/10870 eivind Kernel panic when writing to write-protec o [1999/05/13] kern/11697 tegge Disk failure hangs system f [1999/06/05] kern/12041 Crashes on startup if Zip drive is switch o [1999/09/11] bin/13691 fenner tcpslice cannot extract over 2GB part of s [1999/09/16] conf/13775 multi-user boot may hang in NIS environme f [1999/09/30] ports/14048 des [patch] doscmd -r doesn't work o [1999/10/14] kern/14334 imp [patch] AHA-1542A not supported by FreeBS a [1999/11/04] kern/14712 iedowse [nfs] root has access to NFS mounted dire s [1999/11/17] bin/14946 mjacob rmt - remote magtape protocol o [1999/12/24] bin/15662 markm [PATCH] perl5 Sys::Hostname fails if no P s [1999/12/26] kern/15707 bad trap in mprotect o [2000/01/02] i386/15845 imp [patch] Driver for RealTek 8029 f [2000/01/04] bin/15877 tobez Perl 5.00503 interpreter crashes with a s o [2000/01/12] kern/16090 mdodd No buffer space available p [2000/01/22] kern/16299 peadar [nfs] nfs.ko can be unloaded when nfsd is o [2000/02/21] conf/16879 tanimura [sound] Sound drivers seem to be using sh o [2000/02/24] bin/16948 qa [sysinstall] sysinstall/disklabel: bad pa o [2000/03/11] kern/17310 wpaul [patch] NIS host name resolving may loop o [2000/03/17] kern/17422 bde 4.0-STABLE: top: nlist failed s [2000/03/22] conf/17540 [nfs] NIS host lookups cause NFS mounts t o [2000/03/27] kern/17620 jhay Digi/570i sync driver (if_ar.c) causes sy o [2000/04/04] i386/17800 bde [PATCH] problem with statclock initializa o [2000/04/06] kern/17819 [unionfs] Build ports on nfs & union moun o [2000/04/14] kern/18012 [patch] vfs_subr.c: vnode_free_list corru o [2000/04/17] i386/18065 mdodd FREEBSD 4.0 crashes on boot Compaq Prolia f [2000/04/24] i386/18185 gibbs Adaptec 3950U2 errors during boot/probe o [2000/05/18] kern/18641 paul [panic] FreeBSD V4.0 crashes when using i s [2000/05/22] bin/18742 mike times.allow field parsed incorrectly s [2000/05/24] ports/18800 green security/cfs ports installation fix p [2000/05/29] kern/18874 [2TB] 32bit NFS servers export wrong nega o [2000/06/13] i386/19245 obrien -fexpensive-optimizations buggy (even wit s [2000/06/20] bin/19405 markm telnetd sends DO AUTHENTICATION even if a o [2000/07/02] kern/19654 mbr 20 dc ports in one machine (5x 4port card s [2000/07/08] bin/19773 markm [PATCH] telnet infinite loop depending on o [2000/07/13] gnu/19882 obrien ld does not detect all undefined symbols! o [2000/07/18] kern/20016 threads pthreads: Cannot set scheduling timer/Can o [2000/07/19] kern/20040 jhb Toshiba 2775 hangs after pcib0 driver is o [2000/07/25] bin/20172 byacc 1.9 fails to generate $default tran o [2000/07/29] bin/20282 qa [sysinstall] sysinstall does not recover o [2000/07/30] i386/20308 mux [panic] vidcontrol VESA_800x600 causes a p [2000/08/03] bin/20373 Setting breakpoints in shared objects bro f [2000/08/05] kern/20429 [kbd] setting flags 0x1 in atkbd0 locks k o [2000/08/08] ports/20490 perky Termios timeout parameters, VMIN, VTIME, f [2000/08/10] bin/20521 mjacob /etc/rmt several problems o [2000/08/10] kern/20523 bde Support for PCI multiport cards for sio d o [2000/08/16] bin/20633 fdisk doesn't handle LBA correctly f [2000/08/18] kern/20689 scsi Newbusified version of ncr driver does no o [2000/08/18] kern/20708 imp Adaptec 1542 ISA SCSI Controller not dete o [2000/08/23] kern/20804 deadlocking when using vnode disk file an o [2000/08/26] kern/20861 threads libc_r does not honor socket timeouts o [2000/08/29] bin/20912 marcel gdb does not recognise old executables. o [2000/08/31] kern/20958 mdodd ep0 lockup with ifconfig showing OACTIVE o [2000/09/07] bin/21089 vi silently corrupt open file on SIGINT w a [2000/09/16] kern/21304 mbr dc0 watchdog timeouts on NetGear FA310TX o [2000/09/20] misc/21406 [boot] bootinst or booteasy overwrites se o [2000/09/21] kern/21461 imp ISA PnP resource allocator problem o [2000/09/22] kern/21463 emulation Linux compatability mode should not allow o [2000/09/29] kern/21642 Compaq Netelligent 10/100 card (TI Thunde o [2000/10/05] kern/21771 rik Fix for sppp and Cronyx drivers update a [2000/10/07] kern/21808 [patches] msdosfs incorrectly handles vno o [2000/10/15] kern/21998 green [patch] ident only for outgoing connectio o [2000/10/20] kern/22142 cjc securelevel does not affect mount f [2000/10/25] bin/22291 [nfs] getcwd() fails on recently-modified o [2000/10/30] kern/22417 gibbs advansys wide scsi driver does not suppor o [2000/11/13] kern/22826 emulation Memory limits have no effect in linux com a [2000/11/14] bin/22846 bms Routed does not reflect preference of Int o [2000/11/18] i386/22944 isa_dmainit fails on machines with 512MB o [2000/11/20] gnu/22972 obrien Internal Compiler Error o [2000/11/25] bin/23098 ambrisko [patch] [sysinstall] if installing on a s o [2000/12/14] kern/23535 imp 4.x kernels seem to no longer support Ada o [2000/12/26] bin/23866 dwmalone patch for pointing out current date o [2001/01/03] kern/24032 markm rndcontrol and pccardd use of interupt ha o [2001/01/04] kern/24074 mdodd Properties of token-ring protocol must be o [2001/01/05] kern/24085 syncing on shutdown leaves filesystem dir o [2001/01/07] docs/24125 wes connect(2) can yield EWOULDBLOCK/EAGAIN o [2001/01/12] bin/24271 dumpon should check its argument more f [2001/01/16] bin/24391 mbr cannot kill amd after interface disappear o [2001/01/19] bin/24461 Being able to increase the YP timeout wit o [2001/01/20] threads/24472threads libc_r does not honor SO_SNDTIMEO/SO_RCVT o [2001/01/25] kern/24629 harti ng_socket failes to declare connected dat o [2001/01/25] threads/24632threads libc_r delicate deviation from libc in ha o [2001/01/25] kern/24641 threads pthread_rwlock_rdlock can deadlock s [2001/01/30] kern/24740 cy filesystem corruption CFP1080 CAM SCSI ca o [2001/02/10] kern/24982 iedowse stack gap usage o [2001/02/11] i386/24997 /boot/loader cannot handle extended dos p o [2001/02/11] ports/25007 max telnetx problem on 4.x o [2001/02/12] kern/25038 murray dhcp client could not set hostname on boo o [2001/02/13] kern/25067 able to mount a pathname > 80 char. but u o [2001/02/14] kern/25093 4.2-STABLE does not recognize PCNet-ISA+ o [2001/02/21] kern/25248 bde sys/user.h needs sys/param.h, but doesn't f [2001/02/21] kern/25261 gibbs ahc0 no active SCB errors when booting of o [2001/03/03] kern/25511 ioctl(fd, FIONREAD, &c) on a FIFO (not PI o [2001/03/05] bin/25542 standards /bin/sh: null char in quoted string f [2001/03/07] ports/25576 x11 XFree86-4 port installs manual pages with o [2001/03/13] i386/25781 i386 Statclocks cannot be disabled on ServerWo p [2001/03/15] bin/25826 nfsd -t -h adr1 -h adr2 doesn't work o [2001/03/16] bin/25851 qa [patch] security hole in anonymous FTP se o [2001/03/18] bin/25886 cgetset(3) doesn't get cleared when switc o [2001/03/19] i386/25909 [hang] 4.x kernel freezes on P3-Asus CUSL o [2001/03/19] kern/25910 sound [sound] Kernel sound driver may die if a o [2001/03/19] bin/25929 qa [fixit] Can't use MAKEDEV in fixit mount o [2001/03/20] kern/25950 obrien Bad drives on asr look zero-length and pa a [2001/03/22] kern/25986 andre Socket would hang at LAST_ACK forever. o [2001/03/23] kern/26035 sound [sound] [hang] system hangs when playing o [2001/03/24] kern/26048 obrien 4.3-RC: SMP and asr driver don't work to a [2001/03/27] kern/26142 [nfs] Unlink fails on NFS mounted filesys o [2001/03/28] kern/26171 emulation not work Linux-emulator, but hi is work i o [2001/04/03] kern/26316 Booting FreeBSD on VMware2 with 2 or 3 et o [2001/04/03] bin/26320 alfred [mount] [patch] mountd breaks IRIX automo a [2001/04/05] gnu/26362 "cvs server" doesn't honour the global -- o [2001/04/08] kern/26430 sound [sound] -CURRENT panics on cat /dev/dsp o o [2001/04/10] kern/26486 [patch] setnetgrent hangs when netgroup c o [2001/04/12] kern/26506 [patch] sendto() syscall returns EINVAL i o [2001/04/25] bin/26842 dd dump with h flag takes a very long time a [2001/04/26] bin/26869 vi(1) crashes in viewing a file with long o [2001/04/27] bin/26897 qa [sysinstall] 4.3R sysinstall fails to cre f [2001/05/03] kern/27059 scsi (symbios) SCSI subsystem hangs under heav f [2001/05/11] kern/27275 kernel bug ? (negative sbsize) o [2001/05/20] kern/27474 Interactive use of user PPP and ipfilter s [2001/05/22] kern/27543 /proc/cpuinfo does not handle SMP hosts o [2001/05/24] docs/27605 doc Cross-document references () o [2001/05/27] kern/27694 sound [sound] Panic in csa(4) f [2001/05/29] i386/27729 qa [sysinstall] the ls120 device "afd" does a [2001/06/05] kern/27893 sos can't burn audio cds on LG CD-RW CED-8083 o [2001/06/05] conf/27896 Error in /etc/exports invalidates entire o [2001/06/09] kern/27995 src/sys/pci if_pcn.c revision 1.21 resp. o [2001/06/12] bin/28095 [PATCH] pax may descend into directories o [2001/06/14] ports/28138 perky python os.statvfs module is not functiona o [2001/06/17] bin/28223 su doesn't look at login.conf all the tim o [2001/06/26] bin/28424 mtree fails to report directory hierarchy o [2001/06/29] kern/28508 scsi problems with backup to Tandberg SLR40 st o [2001/07/04] kern/28692 sound [sound] ICH sound driver hangs kernel o [2001/07/06] kern/28768 The system doesn't get connects on one of o [2001/07/07] bin/28798 mikeh mail(1) with a pager (more) requires fg/C o [2001/07/09] kern/28840 gibbs Possible interrupt masking trouble in sys o [2001/07/14] kern/28966 emulation [patch] math libraries in linux emulation f [2001/07/20] ports/29098 jedgar p5-Mysql port references wrong directory f [2001/07/23] kern/29170 ru ARP request fails after "bad gateway valu o [2001/07/27] bin/29253 natd forgets about udp connections o [2001/08/02] bin/29375 qa [sysinstall] disk editor gets confused by o [2001/08/03] kern/29421 Update a file with mmap will cause mtime/ o [2001/08/05] kern/29465 sound [sound] Can't probe NeoMagic 256AX audio f [2001/08/11] kern/29626 ifconfig causes kernel panic in 4.4-PRERE o [2001/08/13] kern/29686 kevent EV_ADD EVFILT_WRITE does the wrong o [2001/08/15] bin/29725 dwmalone [PATCH] Fixed segmentation fault in simpl o [2001/08/17] bin/29808 ypserv dumps core in yp_find_db o [2001/08/20] bin/29903 ypbind loses connection to NIS master and o [2001/08/23] kern/29983 imp Problem with "TI PCI-1250 PCI-CardBus Bri o [2001/08/27] kern/30125 btx/bootloader dumps very often if serial f [2001/08/28] kern/30160 [panic] kernel panic when flash disk is r f [2001/08/29] i386/30206 mdodd [boot] PS/2 server 85 can't boot kern.flp o [2001/08/30] kern/30223 [patch] Using /usr/share/examples/kld/cde p [2001/08/31] bin/30235 /usr/sbin/portmap cannot listen to localh o [2001/08/31] kern/30241 gibbs System crash w/err: AHC0; AHC_INTR - refe o [2001/09/04] bin/30310 top does not show CPU usage o [2001/09/06] conf/30399 Have Fortran use the CPUTYPE variable o [2001/09/10] kern/30482 calcru calls printf while holding a spin o [2001/09/10] alpha/30486 alpha AlphaServer DS10 floppy access is broken o [2001/09/10] alpha/30487 alpha Floppy access on AlphaServer DS20 solid l f [2001/09/11] kern/30502 usb panics if logitech joystick usb attached o [2001/09/15] kern/30592 roam [PATCH] panic: static sysctl oid too high o [2001/09/17] kern/30630 fenner Failure to check for existence of interfa o [2001/09/21] kern/30712 fatal kernel trap during ufs_rename a [2001/09/24] i386/30802 gibbs repeat of i386/22760. Adaptec SCSI contro o [2001/09/26] bin/30837 qa [sysinstall] sysinstall doesn't set the s o [2001/09/27] i386/30860 [hang] While install after "Mounting root o [2001/09/27] bin/30869 dump(8) does not dump all files of a file s [2001/09/29] i386/30921 [kbd] ACER mechanic ps/2 keyboard donīt w o [2001/10/01] kern/30948 ls'ing mounted brand new floppy locks up o [2001/10/01] kern/30958 rwatson QUOTA with 0 bytes in quota.user hangs up f [2001/10/01] bin/30966 fenner TCPdump repeating on Radius accounting pa o [2001/10/01] kern/30971 peter [nfs] NFS client modification time resolu s [2001/10/02] ports/30993 ports-bugs xxgdb cannot open source file s [2001/10/04] kern/31047 Linux programs do not dump core in linux o [2001/10/07] kern/31102 wpaul lge + Pentium III data transmission probl o [2001/10/14] kern/31266 cjc System can be crashed with "ls -al /flopp o [2001/10/15] bin/31304 joe [patch] fix crunchgen to work with more c o [2001/10/18] bin/31363 qa [sysinstall] "partition editor" silently o [2001/10/30] conf/31631 "MAC address" can't be acquired properly. a [2001/10/31] kern/31659 usb USB controller driver will die after some o [2001/11/04] kern/31746 failed connect(2) seems to cause problems o [2001/11/06] kern/31790 [nfs] problem with NFS and jail() o [2001/11/12] kern/31940 nge gigabit adapter link reset and slow t o [2001/11/14] i386/31979 [kbd] Setup and boot locks Compaq Armada o [2001/11/19] kern/32098 semctl() does not propagate permissions a [2001/11/19] kern/32118 mbr 21143 with dc driver will not select 10ba o [2001/11/20] ports/32121 x11 XFree86-4-Server: xf86cfg 4.1.0 writes ba o [2001/11/20] kern/32124 imp Cannot set 128 bit wep key on prism2 (wi0 o [2001/11/23] kern/32226 time of day clock runs fast (approx twice o [2001/11/26] bin/32295 threads pthread dont dequeue signals o [2001/11/28] kern/32353 if kern.maxproc > 512 sybase ASE 11.9.2( o [2001/11/29] bin/32374 vi -r doesn't work, file contained unexpe o [2001/12/08] bin/32619 des libfetch does not use RFC 1738's definito o [2001/12/10] kern/32668 peter [nfs] NFS directory removal problems mani f [2001/12/11] bin/32686 wosch locate command dumps a core file with bro f [2001/12/12] kern/32713 usb [usb] mouse detaches from hub and doesnt f [2001/12/13] bin/32791 ru FreeBSD's man(1) utility vulnerable to ol f [2001/12/13] kern/32797 glebius [netgraph] Problem with IPX and netgraph( o [2001/12/22] ports/33080 ume gkrellmvolume interferes with the ability a [2001/12/22] i386/33089 murray GENERIC bloat causes 'make world' to brea o [2001/12/24] kern/33138 [patch] pnp problem in 4.3, 4.4, 4.5 p [2001/12/26] kern/33201 net/net_osdep.c:if_name is broken f [2001/12/26] bin/33213 ume rarpd(8) fails to init IPv6 enabled inter o [2001/12/30] kern/33344 davidxu memory leak in device resource config loa o [2001/12/31] bin/33370 qa [sysinstall] post-configuration issue o [2002/01/02] kern/33464 soft update inconsistencies after system o [2002/01/04] kern/33532 sound [sound] Playing audio on some soundcards f [2002/01/04] gnu/33551 cvs chokes on OpenBSD repositories o [2002/01/08] bin/33672 [patch] telnetd and mount_mfs signal hand f [2002/01/08] kern/33696 mbr [panic] Driver mistake: repeat make_dev(" o [2002/01/09] kern/33738 [patch] argv == NULL is not handled corre o [2002/01/13] kern/33833 luigi Correct kernel config for 4.4-RELEASE is f [2002/01/13] kern/33839 usb usb0: host controller halted (involving A o [2002/01/16] kern/33940 [patch] quotactl allows compromise gid-qu o [2002/01/18] kern/34017 The siginfo_t passed to the signal handli o [2002/01/18] bin/34030 miibus.ko can be loaded into the kernel w o [2002/01/20] kern/34071 [pcn-driver] is sort-of-broken in 4.5RC2 s [2002/01/20] i386/34092 reboot hangs the system (IBM PC Server 31 o [2002/01/21] gnu/34128 sdiff "e" doesn't work with some editors o [2002/01/25] gnu/34246 joe CVS doesn't rebuild CVSROOT/options f [2002/01/25] bin/34269 fenner tcpdump -v incorectly identifies packets o [2002/01/25] bin/34270 man -k could be used to execute any comma o [2002/01/31] kern/34470 bde Modem gets sio1 interrupt-level buffer o o [2002/02/01] threads/34536threads accept() blocks other threads o [2002/02/03] kern/34568 [lpt] turning printer on and off hangs th p [2002/02/04] kern/34619 bms TCP - FINs with different sequence number p [2002/02/07] bin/34682 fenner scanf/sscanf doesn't understand %lld f [2002/02/09] kern/34765 darrenr Unloading the ipl.ko module will panic th o [2002/02/11] bin/34811 sh: "jobs" is not pipeable o [2002/02/11] kern/34842 [NIS] [patch] VmWare port + NIS causes "b f [2002/02/17] kern/35061 usb After printing to HP Deskjet 656c USB pri o [2002/02/18] i386/35078 [patch] Uninitialized pointer dereference o [2002/02/19] bin/35116 keyinfo(1) reports root's keyinfo o [2002/02/20] kern/35136 luigi VLAN & bridging & MTU o [2002/02/22] bin/35214 obrien dump program hangs while exiting f [2002/02/24] kern/35269 kris possible panics with 4:1 filesystem ratio p [2002/02/25] standards/35307standards standard include files are not standard c o [2002/02/26] i386/35350 Can't boot on ASUS TXP4 o [2002/02/26] kern/35351 sound [sound] emu10k1: no posibility to record o [2002/02/28] kern/35396 poll(2) doesn't set POLLERR for failed co o [2002/02/28] kern/35399 poll(2) botches revents on dropped socket o [2002/02/28] kern/35429 select(2)/poll(2)/kevent(2) can't/don't n o [2002/03/01] kern/35442 [patch] Problem transmitting runts in if_ o [2002/03/03] kern/35506 innetgr() doesn't match wildcard fields i o [2002/03/03] kern/35511 sis(4) multicast filtering doesn't pass s o [2002/03/07] kern/35615 sound [sound] [hang] ES1978 Maestro 2E sound ca f [2002/03/07] kern/35645 bms Layer 2 switching using default router of o [2002/03/08] kern/35669 [nfs] NFSROOT breaks without a gateway s [2002/03/08] docs/35678 doc docproj Makefiles for web are broken for f [2002/03/08] kern/35691 mbr Realtek NIC driver does not work with Rea o [2002/03/09] kern/35703 /proc/curproc/file returns unknown o [2002/03/10] conf/35726 andre [patch] [rc.network] can't use ifconfig o o [2002/03/14] gnu/35878 /usr/bin/strip resets ABI type to FreeBSD o [2002/03/15] bin/35925 qa [sysinstall] fixit floppy cannot be mount a [2002/03/16] bin/35985 qa [sysinstall] swap double mount o [2002/03/17] i386/36003 Cyclades Cyclom YeP causes panics on Free p [2002/03/18] kern/36038 bp [smbfs] sendfile(2) on smbfs fails, expos o [2002/03/19] misc/36086 trhodes Kerberos Problem/Handbook wrong/Followup a [2002/03/19] bin/36110 dmesg output corrupt if /dev/console is b o [2002/03/20] kern/36147 bogus irq 7 message being issued o [2002/03/21] docs/36168 doc -pthread/_THREAD_SAFE docs missing in gcc o [2002/03/22] kern/36219 [patch] poll() behaves erratic on BPF fil o [2002/03/28] kern/36415 [bktr] [patch] driver incorrectly handles o [2002/03/29] kern/36504 [patch] crash/panic vm_object_allocate un o [2002/03/29] bin/36508 qa [sysinstall] installation floppy bug (4.5 o [2002/03/30] i386/36517 sis driver can't map ports/memory for Net o [2002/03/31] kern/36566 [smbfs] System reboot with dead smb mount o [2002/04/05] kern/36784 Can't fcntl(fd, F_SETFL, ...) on a pseudo o [2002/04/07] ports/36846 ports-bugs fxtv 1.03 freezes the system when $LANG=d f [2002/04/07] i386/36850 usb Page Fault using ppp with USB Modem [4.9] o [2002/04/08] bin/36867 [patch] games/fortune: add FORTUNE_PATH e o [2002/04/08] bin/36911 qa [sysinstall] installation floppies miss a o [2002/04/09] gnu/36926 send-pr destroys PR if emacs interrupt ch o [2002/04/10] i386/36943 reboot hangs on Tyan Thunder K7 with SMP o [2002/04/14] kern/37057 Problem with rlimits on filesystem mounte o [2002/04/14] kern/37064 imp [pccard] System hangs when removing wire o [2002/04/15] kern/37109 Kernel refuses to assign unused IP to tun p [2002/04/16] kern/37161 emulation ext2 linux file system, error handling la s [2002/04/17] ports/37186 ports-bugs Dbview contains an error, because of whic f [2002/04/19] i386/37240 EtherExpress16 not probed at boot o [2002/04/19] kern/37261 luigi kernel is not linking without "device eth o [2002/04/22] kern/37326 [bktr] smbus/bktr crash when omitting "de o [2002/04/22] bin/37343 portmap TCP binds strangeness o [2002/04/25] kern/37436 [hang] accept dead loop when out of file o [2002/04/25] kern/37441 davidxu [patch] ISA PNP parse problem o [2002/04/27] kern/37502 [nfs] NFS client ignores mtime.tv_usec fo o [2002/04/28] i386/37523 davidxu [patch] lock for bios16 call and vm86call o [2002/04/30] i386/37585 qa [hang] System hangs on install at probing o [2002/04/30] kern/37589 imp Kernel panics upon resume from zzz on my o [2002/04/30] ports/37596 shige EMACS_PORT_NAME=xemacs21 forks make infin o [2002/05/02] kern/37675 le [vinum] Page fault when newfs'ing a vinum o [2002/05/03] kern/37710 murray LAN interface in wrong state after attemp f [2002/05/05] kern/37775 [smbfs] netsmb/smb_subr.c needs opt_globa o [2002/05/13] kern/38011 rsm Fatal Trap 12 using Xircom CE2 in IBM 760 f [2002/05/13] ports/38018 java www/jakarta-tomcat4: make passing of JVM f [2002/05/13] ports/38020 java www/jakarta-tomcat4: stop tomcat via java o [2002/05/14] bin/38058 brian ppp w/ VJ compression alters IP header le o [2002/05/14] i386/38070 [panic] 4.6-PRERELEASE panics on resume o o [2002/05/15] kern/38095 bp vlan not supported with fxp f [2002/05/17] kern/38166 gad ipv6_gateway_enable="YES" breaks lpd f [2002/05/18] ports/38212 knu XFree86-4 and portupgrade get dependencie f [2002/05/23] i386/38459 mux Intel SB82558B NIC won't initialize prope o [2002/05/24] i386/38484 [hang] probe freeze while probing devices o [2002/05/24] kern/38495 bms soreceive fails to maintain invariant on o [2002/05/24] kern/38518 [boot] combination of pr-27087 and pr-369 s [2002/05/24] kern/38527 /dev/random does not obey O_NONBLOCK flag o [2002/05/25] kern/38549 threads the procces compiled whith pthread stoppe a [2002/05/25] kern/38554 bms changing interface ipaddress doesn't seem o [2002/05/26] bin/38582 qa [sysinstall] sysinstall sets newfs flag a a [2002/05/27] gnu/38594 kan Fortan program don't link post gcc-3.1 o [2002/05/27] bin/38609 qa [sysinstall] sysinstall should know the s o [2002/05/27] kern/38632 imp Loss of connection with wi cards o [2002/05/30] i386/38731 Freebsd doesn't support ( pdc20276 / Raid f [2002/05/30] kern/38736 usb kernel panic during memory stick removal o [2002/05/30] kern/38752 andre rn_walktree_from not halting at the right o [2002/06/01] kern/38795 sound [sound] kldunload of snd_ess, snd_sb16, s o [2002/06/03] kern/38872 [nfs] nfs code ignores possibility of MGE o [2002/06/04] i386/38894 Dell PowerEdge 4600 PCI Bus scan problems o [2002/06/05] bin/38918 edquota breaks silently when quota-marked o [2002/06/07] kern/38983 Kernel fails to access disk o [2002/06/12] kern/39185 core dump binary in single user mode o [2002/06/13] kern/39233 bms NonConforming IPsec implementation from F o [2002/06/13] kern/39252 Syscons doesn't support 8-bit control cha o [2002/06/14] kern/39260 sound [sound] pcm0 locks on boot, Compaq Presar o [2002/06/15] kern/39329 [mount] '..' at mountpoint is subject to o [2002/06/15] kern/39331 dwmalone namei cache unreliable for __getcwd() f [2002/06/15] kern/39341 usb ppp + USB modem problem o [2002/06/17] kern/39388 scsi ncr/sym drivers fail with 53c810 and more s [2002/06/18] ports/39476 ports-bugs profxp will run but when you fxp a file i s [2002/06/19] i386/39536 FreeBSD default bootloader does not load o [2002/06/20] i386/39604 Install failure on HP Pavilion 310n - Una f [2002/06/24] kern/39805 usb 4.6R install panics with umass0 device co o [2002/06/25] bin/39849 /sbin/restore fails to overwrite files wi f [2002/06/26] conf/39887 matusita /stand/sysinstall doesn't set sendmail_en o [2002/06/26] bin/39896 netmask 0xffffff00 no longer works in /et o [2002/06/27] threads/39922threads [PATCH?] Threaded applications executed w o [2002/06/27] kern/39928 imp wi0 timeouts and hangs the system while s a [2002/06/27] kern/39937 bms ipstealth issue a [2002/06/28] bin/39940 [patch] /usr/sbin/periodic sends thousand o [2002/06/29] kern/40001 le [vinum] vinum showing -2 drives after rem o [2002/06/30] i386/40044 SMP kernel fails to boot on DELL 610 o [2002/07/01] i386/40073 rsm Xircom Realport Ether doesn't work in Tos o [2002/07/02] kern/40122 sound [sound] Device pcm stopps booting Kernel f [2002/07/03] kern/40139 darrenr ipfilter issue o [2002/07/05] misc/40206 Can not assign alias to any POINTOPOINT i o [2002/07/05] bin/40215 wpaul [nis] NIS host search not terminate o [2002/07/05] i386/40219 i386 [apm] apm breaks removable media o [2002/07/05] bin/40227 [patch] CVS client doesn't upload new fil o [2002/07/06] bin/40260 qa [sysinstall] hang when detecting devices f [2002/07/06] i386/40274 "fxp: device timeout" errors during heavy o [2002/07/06] bin/40278 mktime returns -1 for certain dates/timez o [2002/07/07] bin/40282 /bin/kill has bad error checking for comm o [2002/07/10] kern/40394 if_tap driver hard coded permission check o [2002/07/12] bin/40471 des chpass(1) -a option broken in CURRENT o [2002/07/14] kern/40561 TTCP does not work with IPv6 o [2002/07/14] kern/40574 sound [sound] NeoMagic soundcard detection on G o [2002/07/15] i386/40577 [hang] post-October 2001 Dell Inspiron 25 f [2002/07/16] bin/40656 qa [patch] [sysinstall] scripted deletion of o [2002/07/19] kern/40787 kernel panic if PCMCIA CD-drive with moun o [2002/07/19] kern/40792 usb signals lead to data loss on device ugen o [2002/07/22] kern/40895 scsi wierd kernel / device driver bug o [2002/07/26] kern/41007 net overfull traffic on third and fourth adap s [2002/07/30] i386/41138 vr0 locks up on one hub, OK on another o [2002/07/31] kern/41216 [nfs] Get "NFS append race" error o [2002/08/01] conf/41242 periodic scripts make unwarranted assumpt o [2002/08/03] bin/41297 mp {t,}csh backquote/braces expansion bug f [2002/08/04] bin/41327 jon skey decrementing but not authorizing wit o [2002/08/04] kern/41331 threads Pthread library open sets O_NONBLOCK flag o [2002/08/05] bin/41350 vnconfig: apparent off-by-one bug o [2002/08/07] kern/41402 [panic] kernel panics in pmap_insert_entr o [2002/08/07] bin/41410 /bin/sh bug on expanding $? in here-docum o [2002/08/08] bin/41435 mbr dhclient writes lease file that it can't o [2002/08/13] kern/41632 luigi bridging when one interface has no carrie a [2002/08/14] bin/41647 bms ifconfig doesn't accept lladdr along with o [2002/08/16] kern/41720 if_nge_load=YES make system not bootable o [2002/08/17] kern/41740 le [vinum] page fault while rebuilding; inab o [2002/08/18] bin/41757 qa [sysinstall] sysinstall 4.6.x unstable p [2002/08/18] kern/41765 bms UDP socket remains connected after error s [2002/08/19] bin/41776 bms mrouted doesn't route multicast packets o [2002/08/19] conf/41777 /etc/periodic/daily/100.clean-disks remov o [2002/08/20] docs/41824 murray LANG is not documented in setlocale(3) o [2002/08/21] bin/41850 qa [sysinstall] sysinstall fails to create r o [2002/08/25] bin/42004 quota and rpc.statd are still IPv4 only, p [2002/08/26] kern/42030 bms panic when zebra works on detaching tun i o [2002/08/27] kern/42089 phk ntp_gettime returns time in wrong scale o [2002/08/27] bin/42093 ypbind hangs on NIC with the lowest scope o [2002/08/28] misc/42115 luigi PicoBSD: fix build script for 4.6-STABLE o [2002/08/29] kern/42173 sound [sound] Sony VAIO FXA 53 (or FXA 679 in M o [2002/08/30] i386/42198 pjd Kernel panics or system hangs up with big s [2002/08/30] kern/42216 rwatson simultaneous multiple server network fail o [2002/09/04] bin/42407 ppp(8) IPV6CP fails o [2002/09/06] ports/42483 cy misc/screen problem with editors/vim-lite o [2002/09/07] i386/42539 Fatal Trap 12 resulting from Conner Perip o [2002/09/09] kern/42578 Using PCI serial cards (puc) in SMP machi p [2002/09/09] kern/42580 robert kernel crash when starting ISC 3.2 X11 bi o [2002/09/10] kern/42621 imp Dell Inspiron 5000e hangs when using Orin o [2002/09/11] kern/42652 [smbfs] error deleting r/o (by windows) f o [2002/09/11] bin/42658 markm recompile /usr/src/libexec/telnetd and lo o [2002/09/13] gnu/42726 cvsadm cvs -R pserver & val-tags: story continue p [2002/09/13] kern/42727 bms [PATCH] Wrong MTU in need-frag ICMP using o [2002/09/13] kern/42748 usb USB does not work (Fujitsu Lifebook) o [2002/09/13] i386/42750 Fdisk makes no difference between FAT32, p [2002/09/14] docs/42762 doc ppp.8 has no description of $env and ~use o [2002/09/14] kern/42769 [boot] Boot stalls if the system has a se o [2002/09/14] i386/42784 imp pcmcia 16bit network card removal locks a f [2002/09/15] kern/42796 scsi NCR/SYM 53C825 driver detects scsi cdrom o [2002/09/15] kern/42801 [hang] FreeBSD freezes when opening cuaa0 a [2002/09/18] kern/42937 bms panic when ARP cache uses up all mbufs o [2002/09/20] kern/42983 imp wi0 sporadically freezes the system for 1 o [2002/09/21] i386/43151 Panic 20 seconds after resume o [2002/09/22] bin/43223 getnetby{name|addr} broken for DNS lookup o [2002/09/24] bin/43337 des fetch: -s fails if -4 or possibly other o f [2002/09/25] i386/43366 usb Cannot format media in USB floppy devices o [2002/09/28] www/43454 www Packages hard to find, often missing o [2002/09/29] kern/43462 usb copying files from olympus C-4040 digital o [2002/09/29] kern/43491 microuptime () went backwards o [2002/09/30] bin/43501 getpwnam, getpwuid fail when linking agai p [2002/10/01] alpha/43567 robert strtod() core dumps o [2002/10/02] kern/43576 imp Problem with wi driver and Lucent Orinoco o [2002/10/02] bin/43592 mktime rejects dates at the start of dayl a [2002/10/03] kern/43605 luigi enabling polling in the kernel causes pag o [2002/10/03] kern/43625 imp Wi(4) driver hangs after long data transf o [2002/10/04] bin/43674 [patch] login(1): able to bypass expired o [2002/10/05] kern/43713 during install, mounting root from ufs:/d o [2002/10/08] conf/43837 wollman PKST (pakistan daylight time) changed fro o [2002/10/09] i386/43852 4.7-RC "device timeout" problem a [2002/10/10] kern/43885 ken [patch] USB CDROM does not work with vmwa f [2002/10/10] ports/43886 markm local exploitable overflow in rogue o [2002/10/11] java/43924 glewis writing from JAVA to a pipe sometimes han o [2002/10/12] kern/43954 [nfs] nfs-blocked process can't return or o [2002/10/13] bin/43993 usb /usr/sbin/usbd does not handle an usb eve a [2002/10/14] kern/44030 VNode/Swap troubles o [2002/10/15] kern/44087 [crash] fatal kernel trap when ifconfig a o [2002/10/16] kern/44126 paul lnc network hungup at large traffics on V o [2002/10/16] i386/44130 i386 Enabled apm hangs up FreeBSD kernel on i8 o [2002/10/16] kern/44150 Diskless kernel may crash, depends on the o [2002/10/18] i386/44188 qa [install] cannot install FreeBSD 4.0-4.6 o [2002/10/18] kern/44202 -stable rp driver does not work with mult o [2002/10/18] kern/44218 Init dies during boot after upgrade from o [2002/10/19] conf/44263 imp Intel AnyPoint II Wireless Card Unrecogni p [2002/10/21] kern/44336 [nfs] NFSv3 client broken - security prob o [2002/10/21] kern/44355 gnn After deletion of an IPv6 alias, the rout o [2002/10/23] kern/44417 luigi ipfw layer2 rules are not checked for eth s [2002/10/26] bin/44504 mp tcsh-6.12.00's "source" command ignore co s [2002/10/27] bin/44518 yar ftpd does not show OPIE OTP challenge o [2002/10/27] docs/44519 yar ftpd.conf(5) contains references to ftpd( o [2002/10/28] gnu/44564 peter [PATCH] Aborted cvs session causes an end o [2002/10/28] kern/44578 [nis] getnetgrent fails to read NIS netgr o [2002/10/30] kern/44744 [patch] VN devices can hang system FreeBS o [2002/11/01] bin/44808 opiepasswd makes bad seed for existing us o [2002/11/04] i386/44867 Frequent hard hangs on ASUS P4T-E/P4S-533 o [2002/11/04] kern/44884 imp [pccard] pcic is broken in current (build o [2002/11/07] kern/45023 emulation flexlm does not run with linux-base-7, st o [2002/11/09] gnu/45168 Buffer overflow in /usr/bin/dialog o [2002/11/13] bin/45272 dump/restore problem o [2002/11/15] docs/45303 doc Bug in PDF DocBook rendering o [2002/11/15] kern/45322 Panic on resume (zone: entry not free) o [2002/11/17] kern/45373 mckusick softupdate / fs damaged after loss of pow o [2002/11/18] kern/45403 imp Cannot install -CURRENT via pccard networ o [2002/11/19] bin/45478 /bin/sh coredump o [2002/11/20] i386/45525 imp Dell Inspiron 7000 does not recognize PC- f [2002/11/20] bin/45529 johan hexdump core-dumps with certain args [PAT o [2002/11/21] kern/45558 [msdosfs] mdconfig and msdosfs make fs wr o [2002/11/21] bin/45565 qa [sysinstall] write error, filesystem full o [2002/11/21] kern/45568 gibbs ahc(A19160) pci parity error f [2002/11/22] kern/45579 usb Panic from USB stack after device detach o [2002/11/24] kern/45673 sound [sound] [patch] PC98 internal CS4231A is f [2002/11/25] kern/45713 scsi If you use the amr driver, it is impossib f [2002/11/25] bin/45721 darrenr ipfilter's flags and icmp-type processing p [2002/11/25] kern/45733 bms file descriptor flags and socket flags ou o [2002/11/27] i386/45773 Softboot causes autoconf failure on Broad o [2002/11/27] kern/45777 crashdump issue with too-small dumpdev o [2002/12/02] kern/45913 imp WaveLan driver problems with latest -CURR o [2002/12/04] bin/45990 dwmalone top dumps core if specific errors in pass o [2002/12/04] bin/45995 markm Telnet fails to properly handle SIGPIPE o o [2002/12/05] kern/46017 [smbfs] smb mounts break /etc/periodic/we o [2002/12/06] kern/46036 inaccurate timeouts in select(),nanosleep f [2002/12/09] kern/46152 scsi Panic in adw dumping to tape o [2002/12/10] kern/46176 usb umass causes kernel panic if device remov o [2002/12/11] i386/46194 5.0-RC1 kern floppy load fails on AMD K6- o [2002/12/13] kern/46239 standards posix semaphore implementation errors o [2002/12/13] kern/46245 sound [sound] AC'97 is not supported on ABIT BW a [2002/12/17] ports/46322 tobez lang/perl5 - string '0' (zero) is not con s [2002/12/18] ports/46338 ports-bugs security/cyrus-sasl 1.5.27_7 mysql_verify o [2002/12/18] bin/46352 Open file descriptors and signal handling o [2002/12/19] i386/46371 usb USB controller cannot be initialized on I f [2002/12/20] kern/46392 le [vinum] kernel, vinum, umount, changing u o [2002/12/23] i386/46484 System panics upon configuration of bge N f [2002/12/24] i386/46506 usb [usb] [hang] Crash Before Initialization p [2002/12/27] kern/46557 pjd ipfw pipe show fails with lots of queues o [2002/12/29] kern/46618 usb USB (UHCI/ICH3) PALM connect/disconnect/c a [2002/12/31] kern/46647 silby Failure to initialize MII on 3Com NIC res o [2003/01/01] bin/46670 qa [sysinstall] 5.0-RC2 install leaves CD dr o [2003/01/01] bin/46676 ru [PATCH] bsd.dep.mk restricts domain of ta o [2003/01/02] kern/46694 imp Getting DUP packets when in Promiscous mo o [2003/01/08] i386/46865 [panic] kernel panic on SuperMicro 6012-8 o [2003/01/08] bin/46866 NIS-based getpwent() falsely returns NULL f [2003/01/12] kern/47005 usb OHCI USB not noticing device detachments o [2003/01/17] kern/47152 pseudo-device ef in kernel does not creat o [2003/01/17] i386/47167 [panic] 5.0 RC 3 (and 2) has 1 second upt o [2003/01/20] i386/47236 Console missing during bootup on Sony Pic o [2003/01/21] i386/47279 [hang] IBM 370 hangs on reboot o [2003/01/21] kern/47286 device probing not verbose when using boo o [2003/01/22] kern/47359 dd panic after kldunload snp o [2003/01/23] bin/47384 qa [sysinstall] sysinstall ignores intended o [2003/01/24] i386/47449 Thinkpad 755CD floppy boot fails f [2003/01/25] i386/47451 qa [boot] 5.0 GENERIC CD locks during boot o o [2003/01/27] kern/47544 scottl iir does not detect direct access drives o [2003/01/29] kern/47628 trhodes [msdosfs] [patch] msdosfs file corruption o [2003/01/29] kern/47647 [crash] init died with signal 6 [4.7] o [2003/01/31] kern/47731 [panic] reboot goes panic each time [5.0- f [2003/02/01] kern/47787 markm new 5.0 system without perl fails buildwo s [2003/02/02] kern/47813 pseudo-device gre doesn't appear to work o [2003/02/05] kern/47937 hw.ncpu and kern.smp.cpus duplicate same s [2003/02/05] kern/47939 [bktr] 5.0-Current freezes when bktr devi o [2003/02/05] kern/47951 [hang] rtld in ld.so will livelock in som o [2003/02/05] alpha/47952 alpha DEFPA causes machine check with V5.0-rele f [2003/02/06] i386/47989 [install] 5.0-RELEASE install CD kernel p o [2003/02/07] kern/48033 [ffs] FFS superblock flags are being igno o [2003/02/07] kern/48062 mckusick mount -o snapshot doesn't work on +100GB o [2003/02/08] kern/48100 Fatal panic in vm_map_lookup_entry ... [S o [2003/02/09] kern/48117 SMP machine hang during boot related to i o [2003/02/11] kern/48166 panic: pmap_new_proc: u_map allocation fa o [2003/02/11] bin/48183 marcel [patch] gdb on a corefile from a threaded o [2003/02/14] bin/48271 bug with find's -delete option s [2003/02/14] kern/48279 [bktr] Brooktre878 may cause freeze o [2003/02/16] conf/48325 /etc/periodic/security/100.chksetuid does o [2003/02/17] kern/48359 usb SiS 5597/8 USB + uscanner breakage o [2003/02/17] kern/48393 mckusick ufs2 snapshot code bugs p [2003/02/18] bin/48424 Integer overflow in cksum(1) and sum(1) f o [2003/02/18] kern/48425 Tape drive EOT handling problems in 4.7 o [2003/02/19] misc/48461 murray $EDITOR on the fixit CD is wrong. o [2003/02/24] i386/48614 i386 VESA VGA modes for syscons lock up machin o [2003/02/26] i386/48691 [panic] kernel panics on ASUS A7N266-VM M o [2003/02/27] bin/48730 sos burncd does not handle signals and causes o [2003/02/27] kern/48741 darrenr ipnat corrupts packets on gre interface w o [2003/02/27] i386/48752 freeze when installing 5.0 Release o [2003/02/27] kern/48758 kldunload if_{nic} can cause kernel panic o [2003/02/28] kern/48777 vidcontrol modes not restored on vt switc a [2003/03/02] kern/48849 usb Maxtor XT5000 causes panic in boot o [2003/03/02] threads/48856threads Setting SIGCHLD to SIG_IGN still leaves z o [2003/03/03] bin/48865 Dumps made on FreeBSD 5.0-RELEASE are unr o [2003/03/03] conf/48881 [PATCH] The influence of /etc/start_ifnam o [2003/03/05] kern/48952 usb uscanner0 hangs o [2003/03/07] kern/48996 Fatal trap 12 with incoming traffic from o [2003/03/09] kern/49040 problem mounting root; ffs_mountroot can' f [2003/03/09] bin/49048 [patch] ctm(1) does not check parent dire o [2003/03/09] ports/49056 trevor Festival fixes for newer GCCs [PATCH] f [2003/03/10] ports/49076 roam stunnel logs normal end of connection as o [2003/03/10] threads/49087threads Signals lost in programs linked with libc f [2003/03/13] i386/49978 [boot] installation problem on Acer Altos o [2003/03/13] kern/49980 sound [sound] [patch] enable ThinkPAD X24 sound f [2003/03/13] bin/49984 des openSSH crashes while password based auth o [2003/03/16] ports/50042 mbr ports/www/mod_frontpage causes Bad System o [2003/03/17] ports/50062 knu portupgrade does not process directives f a [2003/03/20] kern/50149 usb Using Alcatel SpeedTouch results in "usb0 p [2003/03/28] bin/50384 robert pkg_version -v core-dumps when no package o [2003/04/03] kern/50574 mbr dc driver incorrectly detects ADMtek chip o [2003/04/11] kern/50827 [PATCH] no sane record locking on *nix. s [2003/04/12] kern/50856 [mfs] panic if mounting /tmp as mfs with o [2003/04/13] i386/50887 MBR on kern.flp fails Compaq MBR validati p [2003/04/17] conf/51085 ache FreeBSD is missing ja_JP.eucJP locale. o [2003/04/18] www/51135 www Problems with the mailing-lists search in o [2003/04/20] bin/51171 /bin/sh has only 32-bit arithmetics that o [2003/04/21] standards/51209standards [PATCH] add a64l()/l64a/l64a_r functions o [2003/04/22] kern/51274 ipfw ipfw2 create dynamic rules with parent nu o [2003/04/22] ports/51281 tobez lang/perl5: broken way of upgrading perl5 o [2003/04/23] kern/51308 sound [sound] Creative SB32 doesn't work under o [2003/04/23] kern/51332 mjacob QUIRK: BNCHMARK DLT1 requires SA_QUIRK_1F o [2003/04/24] kern/51338 sound [sound] [hang] system hangs randomly beca f [2003/04/24] kern/51341 ipfw ipfw rule 'deny icmp from any to any icmp o [2003/04/24] kern/51352 panic: malloc(M_WAITOK) in interrupt cont o [2003/04/25] conf/51409 us.emacs.kbd doesn't have 'boot' o [2003/04/29] ports/51539 tobez lang/perl5: dual perl installation breaka o [2003/04/29] kern/51583 [nullfs] [patch] allow to work with devic o [2003/04/30] bin/51628 [nis] ypmatch doesn't match keys in legac o [2003/05/02] kern/51685 [hang] Unbounded inode allocation causes a [2003/05/03] ports/51711 trevor /usr/ports/emulators/linux_base will not o [2003/05/04] kern/51742 [panic] ffs_vfree: freeing free inode o [2003/05/06] bin/51827 getaddrinfo() is broken with numeric serv f [2003/05/06] bin/51892 des can't ssh after su to different local use o [2003/05/08] threads/51949threads thread in accept cannot be cancelled o [2003/05/08] kern/51982 sio1: interrupt-level buffer overflows a [2003/05/11] ports/52068 openoffice portupgrade of editors/openoffice .org-1. s [2003/05/11] ports/52079 ports-bugs vmware3 hangs when nmdm(4) is used as COM a [2003/05/12] ports/52087 openoffice error while building japanese/openoffice s [2003/05/12] kern/52110 green [unionfs] FS corruption when using unionf o [2003/05/12] i386/52128 Unable to floppy install on Toshiba Libre f [2003/05/16] kern/52331 scsi 4.7 to 4.8-REL upgrade: SCSI disks on sym o [2003/05/16] bin/52343 NIS login problem on the server o [2003/05/19] bin/52433 lines in /etc/group longer than 1024 char o [2003/05/19] kern/52445 [mfs] panic when mounting floppy on MFS f o [2003/05/22] i386/52556 i386 Syskonnect SK9843SX, sk driver, MII not d o [2003/05/22] i386/52561 5.1-BETA install fails on Dell PowerEdge o [2003/05/22] i386/52581 i386 Boot loaders reading more than one sector o [2003/05/22] kern/52585 bms Kernel panic with ipfw2 and syncookies f [2003/05/22] i386/52593 mdodd [apm] Kernel panic when starting apm o [2003/05/24] i386/52638 i386 SCSI U320 on SMP server won't run faster f [2003/05/27] kern/52718 jeffr changes to kern_umtx.c causes panic in ca o [2003/05/28] bin/52743 /etc/ppp/ppp.linkup instability issues s [2003/05/28] kern/52745 [unionfs] Fatal trap 12: page fault while o [2003/05/30] ports/52793 ports-bugs Samba 2.2.8a printing woes o [2003/05/31] kern/52818 vm_fault() calls vput() on shared-locked o [2003/06/03] kern/52916 le [vinum] vinum causes panic after start/st p [2003/06/04] kern/52935 bms occasional panic in ip_input with IPSEC o [2003/06/04] kern/52936 [nfs] Huge writes to nfs exported FAT fil o [2003/06/04] kern/52943 [hang] reproducable system stuck just bre o [2003/06/05] kern/52962 imp discrepancy between ifconfig and wicontro p [2003/06/05] standards/52972standards /bin/sh arithmetic not POSIX compliant o [2003/06/06] i386/52975 i386 CPUTYPE=k7 results in non-functional /boo o [2003/06/10] kern/53137 [panic] background fscking causing ffs_va o [2003/06/11] i386/53200 i386 [boot] 5.1-RC1 SMP kernel boot gags at "A o [2003/06/13] kern/53264 sound [sound] [patch] PCM interrupt not routed o [2003/06/16] i386/53382 i386 Repetable panics in ffs_vget() on Prolian s [2003/06/17] ports/53414 ports-bugs port security/amavis-perl open filedescri o [2003/06/17] kern/53416 kmem_map too small after around 12 hours. f [2003/06/18] kern/53433 heavy i/o on GBDE partition on SMP locks o [2003/06/18] bin/53434 pw disallow a password including space. o [2003/06/18] kern/53447 standards poll(2) semantics differ from susV3/POSIX o [2003/06/19] ports/53504 knu pkgdb -F causes ruby to fail (can not all a [2003/06/20] kern/53566 mbr [panic] IBM Eserver (245 || 345) + ServeR o [2003/06/22] bin/53606 roberto ntpdate seems to hang system o [2003/06/23] i386/53620 i386 [install] Kernel panics / reboots during o [2003/06/24] sparc64/53670sparc64 pthreads implementation on 5.1-Release sp o [2003/06/27] bin/53839 qa [sysinstall] disklabel editor fails on po f [2003/06/30] kern/53920 andre sluggish TCP connection o [2003/06/30] kern/53927 imp wi0: device timeout problem with PRISM 2. o [2003/06/30] kern/53940 imp Some WiFi devices cannot connect to hosta o [2003/07/02] i386/54033 i386 Disk lockup. o [2003/07/04] bin/54097 Non-local yppasswd -d broken in 5.1-CURRE o [2003/07/07] kern/54189 [dns] resolver should resolve hostnames w s [2003/07/08] kern/54211 rwatson Seeing other uid with kern.file sysctl. f [2003/07/09] ports/54256 mita japanese/vflib: fix dependency on japanes o [2003/07/10] kern/54309 silby TCP Packet of 64K-1 crashes FreeBSD4.8 o [2003/07/10] gnu/54317 sobomax tar with very large packages and portinst f [2003/07/10] kern/54331 robert shutdown() on a socket registered in a kq o [2003/07/11] bin/54401 [patch] pppstats prints 0 for absolute va o [2003/07/12] standards/54410standards one-true-awk not POSIX compliant (no exte o [2003/07/13] ports/54424 knu portupgrade ignores ALT_PKGDEP o [2003/07/13] bin/54446 pkg_delete doesn't honour symlinks, portu o [2003/07/14] java/54463 glewis Apparent bug in jdk13 o [2003/07/15] i386/54501 i386 Promise Ultra133 TX2 does not work proper s [2003/07/16] kern/54534 [unionfs] unionfs && mfs|md crashing mach f [2003/07/16] i386/54549 [install] panic on install on Dell 600sc o [2003/07/17] kern/54595 sound [sound] emu10k1 sound driver locks system o [2003/07/21] kern/54705 sound [sound] codec timeout during read of regi o [2003/07/22] i386/54756 acpi ACPI suspend/resume problem on CF-W2 lapt o [2003/07/25] bin/54854 cvs pserver sig11 crash on 4.8-R p [2003/07/27] bin/54959 tr utility has a bug in ISO8859-2 locale p [2003/07/28] ports/54970 trevor emulators/linux_base Port Makefile "dange o [2003/07/28] conf/54971 mtm /etc/rc.d/mountcritermote requires ldconf a [2003/07/29] kern/55018 andre [patch] Digiboard PC/Xem fails to initial o [2003/07/29] kern/55028 The broken FAT12 filesystem causes system f [2003/07/30] ports/55039 sada Japanese fonts are not visible with mozil o [2003/07/31] ports/55136 lioux qmail-ldap uses old qmail-ldap patch, por o [2003/08/02] kern/55175 alfred LOR in select and poll o [2003/08/05] gnu/55278 Externs on implicit declarations o [2003/08/05] kern/55297 [vfs_subr.c] kernel panic after running X o [2003/08/07] bin/55346 /bin/sh eats memory and CPU infinitely o [2003/08/07] bin/55349 mbr Amd mixes up symlinks in it's virtual fil o [2003/08/08] bin/55366 le [vinum] [patch] vinum makes /dev/vinum wi s [2003/08/08] ports/55371 ports-bugs xfig dumps core (unaligned access), if US o [2003/08/08] kern/55379 [vm_page_inserti] kernel crashes randomly o [2003/08/10] bin/55448 dbm_nextkey() misbehaves after dbm_store( o [2003/08/11] bin/55457 marcel GDB gets confused debugging libc_r thread a [2003/08/13] kern/55542 andre [patch] discard oversize frame (ether typ o [2003/08/13] i386/55555 i386 system freezes with access to /dev/ums0 o [2003/08/13] i386/55561 i386 SMbus and I2C don't attach when loaded as a [2003/08/14] kern/55587 usb null dereference in usbdi.c: usb_transfer o [2003/08/15] i386/55603 unable to reboot when system runs from My o [2003/08/15] i386/55615 i386 machine freezes - goes on after key press o [2003/08/16] kern/55617 [smbfs] Accessing an nsmb-mounted drive v o [2003/08/17] i386/55661 acpi ACPI suspend/resume problem on ARMADA M70 o [2003/08/20] kern/55727 rl(4) not working in recent 4.8-STABLE: w o [2003/08/20] sparc64/55773jake Conversion from long to long double is br f [2003/08/20] kern/55784 glebius [netgraph] [panic] (with trace) in using o [2003/08/20] kern/55822 acpi No ACPI power off with SMP kernel o [2003/08/21] bin/55829 __stderrp not defined in libc.so.3 (compa o [2003/08/21] bin/55846 and conflict a [2003/08/24] i386/55930 i386 partly configured serial port freezes sys o [2003/08/24] kern/55934 le [vinum] [workaround] kernel panics while o [2003/08/25] bin/55947 printf(1) mishandles \0 o [2003/08/25] bin/55956 passwd chat script not backward compatibl o [2003/08/25] bin/55965 sshd: problems with HostBasedAuthenticati o [2003/08/25] kern/55975 thomas ATAPICAM- READ_6(0x08) fails for ATAPI ta o [2003/08/26] kern/56008 scottl ps shows L flag erroneously with certain o [2003/08/27] kern/56024 acpi ACPI suspend drains battery while in S3 o [2003/08/27] kern/56031 luigi ipfw hangs on every invocation o [2003/08/29] bin/56147 FreeBSD/NetBSD /bin/sh mishandles positio f [2003/08/31] kern/56233 bms IPsec tunnel (ESP) over IPv6: MTU computa o [2003/09/02] kern/56339 select() call (poll() too) hangs, yet cal a [2003/09/03] ports/56363 perky The graphics/py-opengl port is broken o [2003/09/03] i386/56372 acpi acpi don't work on TYAN tiger100 M/B a [2003/09/03] kern/56381 das [unionfs] panic: page fault in fifo_close f [2003/09/04] docs/56456 blackend Initial import of the ro_RO.ISO889-2 doc/ s [2003/09/04] kern/56461 [rpc] FreeBSD client rpc.lockd incompatib p [2003/09/05] bin/56500 roam rpc.lockd needs to use reserved ports o [2003/09/06] kern/56513 [panic] panic in ugen w/ moused -p /dev/u p [2003/09/08] bin/56606 [2TB] df cannot handle 2TB NFS volumes o [2003/09/09] kern/56617 sound [sound] Hang on boot w/Neomagic audio on f [2003/09/10] kern/56659 acpi ACPI trouble on IBM ThinkPad X31 o [2003/09/10] kern/56675 Syncer "giving up" on buffers and ext2 fi f [2003/09/14] kern/56759 scsi [hang] System freezes when writing CD Adv f [2003/09/14] kern/56760 scsi [hang] system hangs at boot with adaptec f [2003/09/14] kern/56871 scsi dd can't write variable length data block o [2003/09/14] kern/56873 qa [boot] system hangs on boot at Buslogic d o [2003/09/15] standards/56906standards Several math(3) functions fail to set err o [2003/09/17] i386/56937 i386 panic: system panic during high network l f [2003/09/18] kern/56973 scsi SCSI errors from on-board Adaptec (AIC7xx o [2003/09/19] kern/57015 imp [patch] Asus wl-100 (pcmcia wifi) support o [2003/09/20] i386/57043 i386 [hang] ar driver with 2 port PCI card loc o [2003/09/22] kern/57085 sanpei [umass] umass0 probl