From nobody Sun Dec 22 06:28:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=ilande.co.uk Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1724934604031957.919807196254; Thu, 29 Aug 2024 05:30:04 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 2987AEC79A; Thu, 29 Aug 2024 12:29:59 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id DA463EC76F for ; Thu, 29 Aug 2024 12:29:42 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by mail.ilande.co.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sjdnW-000ABv-7a; Thu, 29 Aug 2024 12:58:46 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ilande.co.uk; s=20220518; h=Subject:Content-Transfer-Encoding:MIME-Version: Message-Id:Date:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=YvIpTJUISO9TwbvFWf6cxOGxIOWrmTWZgaqE7bAZc1E=; b=vCev3C5rs1MW2724yPdBXUPh6x 9XqKIPngY41wTgITTHTHgv2UDzeP2bsDyWsPOlYzYVN71zlPuVSUIZzz2OzHyfSczphydnUsrB51P hQIxKHpQC8hLtJBZ71aoE0MlxC5U2AevjgK+JdGOkOm2hhq/ECCacDihl07sU0PWclRKcHVqI5rzQ JuN37HQ73pPOqDg+kl+YLawn2BcKBg9m1BjTLIJqbA0cOl0QoKNt2oSCFzKzqyJ7p5ajyerVhyPmO BpaEepmA6TCfbfkweblHQBNYOKuojnjMxHIIBtFS9VnRu4YeSeqxZlcEljT1ZuxZe0zIewvQOUDaZ J3S7ml/VEkD928izgFUq6jQr3EIRWq+wIZtfgulXo7njiDdSGOfbcmfpE86HXYZIdwEK7VAnjx4XS KVG39lMSMG63KIeknwG/zQ1+bbC+W8W6sMHo32rEFRDgIzV/9Higa8D1ZX5mmE6w2bqremOofKtCD qvA0Dr1QZJqP0gwzXxQCB1BrhiRt1i+Fq+5Kcs9aLeaV5uH87ymBiyHfI7/OQvNVaY+drKQ3tFwxd J0TyYIs1C5o3YIN3JOnz9+MF21BYWnc6Gs8H3BBbSZ98FRvjc2RtofPRAY5BThKcUp0EkDZvxJVTj GMjiKrDG/IOX3sG+9sNaMwS5Rmy03ZW1cPdfrazWU=; From: Mark Cave-Ayland To: seabios@seabios.org, pbonzini@redhat.com, hpoussin@reactos.org Date: Thu, 29 Aug 2024 12:58:46 +0100 Message-Id: <20240829115846.954993-1-mark.cave-ayland@ilande.co.uk> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a00:23c4:8bb4:4000:230c:f64:be89:ba65 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.default.ilande.bv.iomart.io X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED,URIBL_SBL_A autolearn=no autolearn_force=no version=3.4.2 X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.ilande.co.uk) X-Spam-Level: ***** Message-ID-Hash: HFOE3HA3HPV2LIOO7MJJ3O7BU5T7AIK6 X-Message-ID-Hash: HFOE3HA3HPV2LIOO7MJJ3O7BU5T7AIK6 X-MailFrom: mark.cave-ayland@ilande.co.uk X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [SeaBIOS] [PATCH] esp-scsi: indicate acceptance of MESSAGE IN phase data List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: / X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1724934606441116600 Content-Type: text/plain; charset="utf-8" When the target has sent its MESSAGE IN phase data to the initiator, it wai= ts for the initiator to release the ACK signal before disconnecting from the b= us. Send a MSG_ACC command to the ESP so that the initiator releases the ACK si= gnal to allow the target to disconnect, and also return the ASC back to the disconnected state. Signed-off-by: Mark Cave-Ayland --- src/hw/esp-scsi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) [MCA: this is required for an upcoming QEMU ESP patch series which enforces the commands that can be executed in each internal ESP state. Without this fix SeaBIOS doesn't return the ESP back to its disconnected state after the SCSI transfer, causing subsequent ESP commands to fail.]=20 diff --git a/src/hw/esp-scsi.c b/src/hw/esp-scsi.c index 8612069f..e1bee545 100644 --- a/src/hw/esp-scsi.c +++ b/src/hw/esp-scsi.c @@ -50,6 +50,7 @@ #define ESP_CMD_RESET 0x02 #define ESP_CMD_TI 0x10 #define ESP_CMD_ICCS 0x11 +#define ESP_CMD_MSGACC 0x12 #define ESP_CMD_SELATN 0x42 =20 #define ESP_STAT_DI 0x01 @@ -159,11 +160,12 @@ esp_scsi_process_op(struct disk_op_s *op) continue; } =20 - /* Finally read data from the message in phase. */ + /* Finally read data from the message in phase and accept. */ if (state =3D=3D 3 && (stat & ESP_STAT_MSG)) { state++; status =3D inb(iobase + ESP_FIFO); inb(iobase + ESP_FIFO); + outb(ESP_CMD_MSGACC, iobase + ESP_CMD); break; } usleep(5); --=20 2.39.2 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org