From patchwork Wed Jun 16 12:15:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shahar Havivi X-Patchwork-Id: 55878 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 526511007D2 for ; Wed, 16 Jun 2010 22:45:59 +1000 (EST) Received: from localhost ([127.0.0.1]:42567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOrdS-0000zu-6D for incoming@patchwork.ozlabs.org; Wed, 16 Jun 2010 08:22:26 -0400 Received: from [140.186.70.92] (port=51295 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOrW2-0004Li-Qd for qemu-devel@nongnu.org; Wed, 16 Jun 2010 08:14:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOrW1-0002Ma-Ed for qemu-devel@nongnu.org; Wed, 16 Jun 2010 08:14:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13390) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOrW1-0002MU-6n for qemu-devel@nongnu.org; Wed, 16 Jun 2010 08:14:45 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5GCEiWk022313 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 16 Jun 2010 08:14:44 -0400 Received: from localhost (dhcp-1-229.tlv.redhat.com [10.35.1.229]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5GCEg1f029814; Wed, 16 Jun 2010 08:14:43 -0400 Date: Wed, 16 Jun 2010 15:15:37 +0300 From: Shahar Havivi To: Gerd Hoffmann , qemu-devel@nongnu.org Message-ID: <2624d3a043d5370897a326a182c5ed9c1e5f3d0a.1276689582.git.shaharh@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-08-17) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH 1/2] Return usb device to host on usb_del command X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Shahar Havivi --- usb-linux.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/usb-linux.c b/usb-linux.c index 88273ff..22a85e3 100644 --- a/usb-linux.c +++ b/usb-linux.c @@ -991,6 +991,7 @@ static int usb_host_close(USBHostDevice *dev) async_complete(dev); dev->closing = 0; usb_device_detach(&dev->dev); + ioctl(dev->fd, USBDEVFS_RESET); close(dev->fd); dev->fd = -1; return 0;