From patchwork Tue Jun 15 18:05:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shahar Havivi X-Patchwork-Id: 55770 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 10D85B7DC5 for ; Wed, 16 Jun 2010 04:16:24 +1000 (EST) Received: from localhost ([127.0.0.1]:47650 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOagN-0008GX-Fu for incoming@patchwork.ozlabs.org; Tue, 15 Jun 2010 14:16:19 -0400 Received: from [140.186.70.92] (port=56688 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOaVY-0002XN-N8 for qemu-devel@nongnu.org; Tue, 15 Jun 2010 14:05:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOaVW-0000MY-CO for qemu-devel@nongnu.org; Tue, 15 Jun 2010 14:05:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1027) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOaVW-0000MR-3j for qemu-devel@nongnu.org; Tue, 15 Jun 2010 14:05:06 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5FI55MX026307 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 15 Jun 2010 14:05:05 -0400 Received: from localhost (dhcp-1-229.tlv.redhat.com [10.35.1.229]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5FI54ht020178 for ; Tue, 15 Jun 2010 14:05:04 -0400 Date: Tue, 15 Jun 2010 21:05:51 +0300 From: Shahar Havivi To: qemu-devel@nongnu.org Message-ID: <2624d3a043d5370897a326a182c5ed9c1e5f3d0a.1276624758.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.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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;