From patchwork Fri May 12 10:20:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 9723865 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 54132600CB for ; Fri, 12 May 2017 10:24:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48753287F3 for ; Fri, 12 May 2017 10:24:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C9B328801; Fri, 12 May 2017 10:24:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E62B1287F3 for ; Fri, 12 May 2017 10:24:22 +0000 (UTC) Received: from localhost ([::1]:52508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d97kD-000701-Vh for patchwork-qemu-devel@patchwork.kernel.org; Fri, 12 May 2017 06:24:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d97hB-00051o-3T for qemu-devel@nongnu.org; Fri, 12 May 2017 06:21:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d97h7-00064Z-Ug for qemu-devel@nongnu.org; Fri, 12 May 2017 06:21:13 -0400 Received: from mx2.suse.de ([195.135.220.15]:39443 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d97h7-0005z8-NZ for qemu-devel@nongnu.org; Fri, 12 May 2017 06:21:09 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9C2D2AB9F; Fri, 12 May 2017 10:21:05 +0000 (UTC) From: Hannes Reinecke To: Paolo Bonzini Date: Fri, 12 May 2017 12:20:55 +0200 Message-Id: <20170512102057.5855-3-hare@suse.de> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170512102057.5855-1-hare@suse.de> References: <20170512102057.5855-1-hare@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: [Qemu-devel] [PATCH 2/4] scsi: use host default timeouts for SCSI commands X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hannes Reinecke , qemu-devel@nongnu.org, Alexander Graf , Hannes Reinecke Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Instead of disabling command aborts by setting the command timeout to infinity we should be setting it to '0' per default, allowing the host to fall back to its default values. Signed-off-by: Hannes Reinecke --- hw/scsi/scsi-disk.c | 3 +-- hw/scsi/scsi-generic.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index dd01ff7e06..4ac4c872fe 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -2898,8 +2898,7 @@ static Property scsi_hd_properties[] = { DEFAULT_MAX_UNMAP_SIZE), DEFINE_PROP_UINT64("max_io_size", SCSIDiskState, max_io_size, DEFAULT_MAX_IO_SIZE), - DEFINE_PROP_UINT32("timeout", SCSIDevice, timeout, - MAX_UINT), + DEFINE_PROP_UINT32("timeout", SCSIDevice, timeout, 0), DEFINE_BLOCK_CHS_PROPERTIES(SCSIDiskState, qdev.conf), DEFINE_PROP_END_OF_LIST(), }; diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c index fd02a0f4b2..998b6a4558 100644 --- a/hw/scsi/scsi-generic.c +++ b/hw/scsi/scsi-generic.c @@ -601,7 +601,7 @@ static SCSIRequest *scsi_new_request(SCSIDevice *d, uint32_t tag, uint32_t lun, static Property scsi_generic_properties[] = { DEFINE_PROP_DRIVE("drive", SCSIDevice, conf.blk), - DEFINE_PROP_UINT32("timeout", SCSIDevice, timeout, MAX_UINT), + DEFINE_PROP_UINT32("timeout", SCSIDevice, timeout, 0), DEFINE_PROP_END_OF_LIST(), };