From owner-p4-projects@FreeBSD.ORG Wed Jan 7 13:23:12 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D9296106567E; Wed, 7 Jan 2009 13:23:11 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9469A106567A for ; Wed, 7 Jan 2009 13:23:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 827148FC14 for ; Wed, 7 Jan 2009 13:23:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n07DNBll091555 for ; Wed, 7 Jan 2009 13:23:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n07DNBA1091553 for perforce@freebsd.org; Wed, 7 Jan 2009 13:23:11 GMT (envelope-from hselasky@FreeBSD.org) Date: Wed, 7 Jan 2009 13:23:11 GMT Message-Id: <200901071323.n07DNBA1091553@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 155754 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 13:23:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=155754 Change 155754 by hselasky@hselasky_laptop001 on 2009/01/07 13:22:11 Make sure that the cancelled error code is always checked and result in a return from the USB callback. Affected files ... .. //depot/projects/usb/src/sys/dev/usb2/sound/uaudio2.c#24 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb2/sound/uaudio2.c#24 (text+ko) ==== @@ -2921,6 +2921,8 @@ uint8_t chan; uint8_t buf[2]; + DPRINTF("\n"); + switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: tr_transferred: @@ -2980,11 +2982,14 @@ if (repeat) { goto tr_setup; } - return; + break; default: /* Error */ DPRINTF("error=%s\n", usb2_errstr(xfer->error)); - + if (xfer->error == USB_ERR_CANCELLED) { + /* do nothing - we are detaching */ + break; + } goto tr_transferred; } }