From owner-p4-projects@FreeBSD.ORG Tue Sep 19 20:21:02 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4028D16A4A0; Tue, 19 Sep 2006 20:21:02 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1877816A47E for ; Tue, 19 Sep 2006 20:21:02 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84F1643D9B for ; Tue, 19 Sep 2006 20:20:52 +0000 (GMT) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k8JKKqoh095685 for ; Tue, 19 Sep 2006 20:20:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k8JKKqiP095682 for perforce@freebsd.org; Tue, 19 Sep 2006 20:20:52 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 19 Sep 2006 20:20:52 GMT Message-Id: <200609192020.k8JKKqiP095682@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 106357 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: Tue, 19 Sep 2006 20:21:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=106357 Change 106357 by hselasky@hselasky_mini_itx on 2006/09/19 20:19:55 USB-cdev bugfix. Prevent devices with no start_write function from waiting forever at close, if there is queued data. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_cdev.c#9 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_cdev.c#9 (text+ko) ==== @@ -951,6 +951,13 @@ return; } +static void +usb_cdev_dummy_start_write(struct usb_cdev *sc) +{ + sc->sc_flags &= ~USB_CDEV_FLAG_FLUSHING_WRITE; + return; +} + static u_int8_t minor_table[(1<<16) / 8]; static u_int32_t @@ -1036,7 +1043,7 @@ } if (sc->sc_start_write == NULL) { - sc->sc_start_write = &usb_cdev_dummy_cmd; + sc->sc_start_write = &usb_cdev_dummy_start_write; } if (sc->sc_stop_write == NULL) {