From patchwork Tue Jul 16 18:09:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 812778 Delivered-To: patch@linaro.org Received: by 2002:a5d:42c4:0:b0:367:895a:4699 with SMTP id t4csp435338wrr; Tue, 16 Jul 2024 11:10:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVjefcA9agYz7Px6/zTsYoEhgYA/H027TkSLKTeMfAyQUTnd/YmuJRBDc3QkdU7dMm6PudZ5uVi+iW4cAY+tou3 X-Google-Smtp-Source: AGHT+IH+ez0Fdx6KL5LdlMCmEz2bXzMMlWo2VbZGFW2DO6Jp8VM1j2YRI/+47OetAQb+Jg0W4evR X-Received: by 2002:ad4:5cc2:0:b0:6b5:53a7:74b3 with SMTP id 6a1803df08f44-6b77f4ecd5emr36490716d6.15.1721153446228; Tue, 16 Jul 2024 11:10:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721153446; cv=none; d=google.com; s=arc-20160816; b=jJUh2hulGZVwJe90Po+4VxNTWZjNboQV7H3V6O78EIrs0N6fjionVjeJobqKULDUzn WG2Ab45Zi9k7hzfhG0SQldg3Folme/Zu8iqlQg/e2UZFoBrvqV+GpbBoQbgSz2jA14iy cgb38BzLVEMGm0jwr8giHbEqWHXbJk7l47eP1mXYcafgr29wxaHIJIFR9bKTac8vTIig rVZVq/lnX3+4nZtx5pTpyqp7Pli9pql3zDBo4ti3RbcCDUjW9gMy8u7KlEK/Qd0yYESB ceL5jdcYLXf7nDh/3jDmFrSynjwuYkb0rTQYIsZ7XkUWvfS5ZWYPZ5LZtZY7hC0kozBD tTGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FU51jMVYxoSXZSJRtYZsN/eDuyNUsq+vn/b+UhmfSb8=; fh=J4M4Z4TZxvAT8lkmK1LtxqMjpO7Qiod4IMBL2bk0hxA=; b=NXBcFS3qY8+EWBmsvvjfZSoMwWn+iExvkz+JwK6O+Jk3Iq1l+Y7T9D9J2VApvaLU+M LFgtS+kpZviEJwiWH3b86bYaXFR3rUTHiLANOgPIK6DQseVNcJp8kJf6ND5YzCaAVM1V m4nEDvB8Y3y5xTMLdMkeIfAS/ZckpWfE+bQkH1Bq5xohdguVbbv1Fzlqeemx1H9vMZjB egyn639NGZwMdbI5hGsDQuFe+Syl4gWJO4bP2Rtx2do6pkWFz4Fz97GcFycc+kqWp8Nh GK8DvA5iA9ZWwq4kfpW0OL9AOLdDbHa4SIk/E005Ks6rOyoQUlvDfsp4/T9y134YPqnX cScA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g5kNvtZ1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6b761a79f8esi82006216d6.568.2024.07.16.11.10.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Jul 2024 11:10:46 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g5kNvtZ1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTmdF-0000eb-9k; Tue, 16 Jul 2024 14:10:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sTmd9-0008Vj-Pe for qemu-devel@nongnu.org; Tue, 16 Jul 2024 14:10:28 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sTmd6-0001Ct-9S for qemu-devel@nongnu.org; Tue, 16 Jul 2024 14:10:25 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-427b1d4da32so129455e9.0 for ; Tue, 16 Jul 2024 11:10:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721153422; x=1721758222; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FU51jMVYxoSXZSJRtYZsN/eDuyNUsq+vn/b+UhmfSb8=; b=g5kNvtZ1ez567cFZpAs5pO/vfBD2amuY3nOG2ZBjxyQPHeEAmz9tGn9D0B71iSF41v owaC5JYAwrl+7pQXhPvAPnciExEhDoFZ80W09oOnqDqZ9gHMgnaS4NSVhZ3NoiekfGD0 acHxeS6Cc/OnUor+QewcxXE49tPs5yejwHmpTtZ+bfEJ/uHKVkx0KWfsAgqb0DFqq4hs NQkFq3L8S/DOFT2Rt8psahswtB2N9TVQV1QJgZ76Iy7w8Hiot43pKjdCNyWHqpO94G8Z ZR0di/dXOwF1ZwG65USXUYmfiTD+Yhl13IMqZlabfwO7oY3oz3hgGgrG7PFLw9am3JD6 e1tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721153422; x=1721758222; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FU51jMVYxoSXZSJRtYZsN/eDuyNUsq+vn/b+UhmfSb8=; b=Y+P06tBdSkskQ17iiXcDyEOIYCZCsgfNn+cGMZ0Wk93epZeoceA8hmDir+eod8W8BT jPVzvZMdvPn6Iyw4YfW7JXEO+MD1i0qlyJiBlJT5mDj8QgqdVLUuB/76yMvIptN/iwR8 RthwaWRRv58CATYnSZB6DmrPYTQATgyLTTkvfX6Jo4E8FXIAUL6KdL26vAvGwjYjvXZ6 rMB+e7NuN6jfvpevWsxoTHnbcWAVRhOWQdWFYyi05NlJQQrZBo8cOBoWHWiDT0LsYwC7 3vsnxOfHhVKAv9AXBMJvNh1Y2Ypa/QOCIAUw+DQUA+GNc8AH2/znkQgakLFZRf5PW2fG ipUg== X-Gm-Message-State: AOJu0Yw1AXtXTGIuyRVcIAh9badYnfDElPuomZOLZIbWdRdCno5KZv7m oYzSdeMEqe0aeVexoL/BaWZWI+WFmZgVepLe89qTg1PAe/Bdx9ti2xZLni7YXrn3ngndDobM2JQ 0JHY1lw== X-Received: by 2002:a05:600c:1e09:b0:426:62a2:34fc with SMTP id 5b1f17b1804b1-427bf39020amr11850995e9.11.1721153422383; Tue, 16 Jul 2024 11:10:22 -0700 (PDT) Received: from localhost.localdomain ([176.187.209.82]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427a5e77429sm138183465e9.8.2024.07.16.11.10.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Jul 2024 11:10:22 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PULL 07/13] esp: remove transfer size check from DMA DATA IN and DATA OUT transfers Date: Tue, 16 Jul 2024 20:09:34 +0200 Message-ID: <20240716180941.40211-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240716180941.40211-1-philmd@linaro.org> References: <20240716180941.40211-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Mark Cave-Ayland The transfer size check was originally added to prevent consecutive DMA TI commands from causing an assert() due to an existing SCSI request being in progress, but since the last set of updates [*] this is no longer required. Remove the transfer size check from DMA DATA IN and DATA OUT transfers so that issuing a DMA TI command when there is no data left to transfer does not cause an assert() due to an existing SCSI request being in progress. [*] See commits f3ace75be8..78d68f312a Signed-off-by: Mark Cave-Ayland Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2415 Message-ID: <20240713224249.468084-1-mark.cave-ayland@ilande.co.uk> Signed-off-by: Philippe Mathieu-Daudé --- hw/scsi/esp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index 5d9b52632e..8504dd30a0 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -594,7 +594,7 @@ static void esp_do_dma(ESPState *s) if (!s->current_req) { return; } - if (s->async_len == 0 && esp_get_tc(s) && s->ti_size) { + if (s->async_len == 0 && esp_get_tc(s)) { /* Defer until data is available. */ return; } @@ -647,7 +647,7 @@ static void esp_do_dma(ESPState *s) if (!s->current_req) { return; } - if (s->async_len == 0 && esp_get_tc(s) && s->ti_size) { + if (s->async_len == 0 && esp_get_tc(s)) { /* Defer until data is available. */ return; }