From nobody Sun Apr 28 21:24:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=john-millikin.com ARC-Seal: i=1; a=rsa-sha256; t=1660715358; cv=none; d=zohomail.com; s=zohoarc; b=cBw/nHwmLWgl1fl4HkluAV1dcGq+gd3j+jzbXt7q3VaBNLQ7u0TvxUGeXZC6jdra1V8atHj3uwOlRO2cy195A2PNs+0rNz6rIOGevkIOL5zdNAHbB/KhV1izdDs0l40DBrynx11ridEkKiQKrKL6nabrNQAbTDb33xZ5iGUjuZk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1660715358; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OebBOD2hTO+oKIg5mbeMZNAWGkiQhaYQdrY39Q9ajZU=; b=fd6jl4Ya++ySZ/6/vXpY+azZWB6whNKimL+ZC/t24O5FYeK6GRGu9Udd6mu2MdY8depha1lwh0WFed/PE9Rvb7zRORlXuOTdwsK7Fl4TI3UEmci5CDZTG7CzSS/NgkZW77vAZn4zNozcrLkC5hOGv/qelmS07XFU6f9gVhRY55I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1660715358431162.06445810580237; Tue, 16 Aug 2022 22:49:18 -0700 (PDT) Received: from localhost ([::1]:51250 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOBvY-0002or-5x for importer@patchew.org; Wed, 17 Aug 2022 01:49:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOBmW-0005GH-Dh for qemu-devel@nongnu.org; Wed, 17 Aug 2022 01:39:59 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:56267) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oOBmU-0006op-OP for qemu-devel@nongnu.org; Wed, 17 Aug 2022 01:39:56 -0400 Received: by mail-pj1-x102e.google.com with SMTP id a8so11559090pjg.5 for ; Tue, 16 Aug 2022 22:39:54 -0700 (PDT) Received: from localhost.localdomain ([2405:6580:98c0:1200:8471:2642:55c0:76cb]) by smtp.gmail.com with ESMTPSA id y22-20020a17090264d600b0016bb24f5d19sm393975pli.209.2022.08.16.22.39.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Aug 2022 22:39:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=john-millikin.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=OebBOD2hTO+oKIg5mbeMZNAWGkiQhaYQdrY39Q9ajZU=; b=T/qM6E+fzJmDaV8Q033SzhaRkvFr6q22ozIzhxnX7FVVhsGHxu7dG4m/xmGwYvuCwx F80YodxBOLvmWUF+0I5vkPAr12M1oeFxPK8os0P4xttZbEz3MBqZe3e7sZ+11UqsL5aC pDUR0RwSJAgpSNqYTghglfo+TCcI044WVlLa91umimJ0zawOKg3iYXu66T7mfCGHPy4T sdfb8lwoLOF5JbmyHsNfWFKWnuvEIGrWp02QdruZ17QOGI5KJLkDvpSjaGQKqvGznPBo QyN3LnNL1EEMrXnv3be4mZ+mPT0QZoL82xuvS10y1jQyfAawF2ofu3U/xXYgczbKih9d mFUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=OebBOD2hTO+oKIg5mbeMZNAWGkiQhaYQdrY39Q9ajZU=; b=LXKrRGxqV1ljLFocpFu5ttertMtYs176Y8JZfj2E3C8wx/PGyKhzdTxrKVXzFJA5Ey zs4WhgX20/4Zd4XLi/YzKyXzpYhufi/atxopuCLTsrP/h+fz44ZpDccJ5gwVtZfk4E0X qDRaywrGO0DdTSt3iHACJ7cXTpdTSP27mlDPBy3rdWKV6169WL8Kdw4X5+GCJJRyt9UK yZI7ye+I3kWANwHL6oB84fJLGF2oHnKNdfWs+l/pEU9N6g2+ybH1VHxcLnjdnZ196s59 ih7yev2hNUXt4iIkiCnFtqmPm7cWcImVYDTAeThU8/YbW6o7RP6zif0cVK0JUvYcJ1En kStQ== X-Gm-Message-State: ACgBeo3UQ3x/oLmaOIceZVqLx2Re/BEECNu9msWLyznI4IdebeOm+2PB glWAAQi4ooKHb1OysDlzvg3QYzkPY6nx8DDA X-Google-Smtp-Source: AA6agR5Z2kqAY3Z4hzWUCUVDen0IbXqe9NCp/HaxS/2E7KI7JN7JPlOuyLBi9kN0Ky8sT/+UaZXORg== X-Received: by 2002:a17:903:18a:b0:16f:8a63:18fe with SMTP id z10-20020a170903018a00b0016f8a6318femr25731467plg.174.1660714793464; Tue, 16 Aug 2022 22:39:53 -0700 (PDT) From: John Millikin To: qemu-devel@nongnu.org Cc: John Millikin , Bill Paul , Mark Cave-Ayland , Paolo Bonzini , Fam Zheng Subject: [PATCH] esp: Handle CMD_BUSRESET by resetting the SCSI bus Date: Wed, 17 Aug 2022 14:38:47 +0900 Message-Id: <20220817053846.699310-1-john@john-millikin.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220817003357.401492-1-john@john-millikin.com> References: <20220817003357.401492-1-john@john-millikin.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=john@john-millikin.com; helo=mail-pj1-x102e.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, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @john-millikin.com) X-ZM-MESSAGEID: 1660715360954100001 Content-Type: text/plain; charset="utf-8" Per investigation on the linked ticket, SunOS issues a SCSI bus reset to the ESP as part of its boot sequence. If this ESP command doesn't cause devices to assert sense flag UNIT ATTENTION, SunOS will consider the CD-ROM device to be non-compliant with Common Command Set (CCS). In this condition, the SunOS installer's early userspace doesn't set the installation source location to sr0 and the miniroot copy fails. Signed-off-by: John Millikin Suggested-by: Bill Paul Buglink: https://gitlab.com/qemu-project/qemu/-/issues/1127 --- hw/scsi/esp.c | 6 ++++++ 1 file changed, 6 insertions(+) (re-sending because I forgot the `Signed-off-by`; sorry) diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index 2d3c649567..c799c19bd4 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -939,6 +939,11 @@ static void esp_soft_reset(ESPState *s) esp_hard_reset(s); } =20 +static void esp_bus_reset(ESPState *s) +{ + qbus_reset_all(BUS(&s->bus)); +} + static void parent_esp_reset(ESPState *s, int irq, int level) { if (level) { @@ -1067,6 +1072,7 @@ void esp_reg_write(ESPState *s, uint32_t saddr, uint6= 4_t val) break; case CMD_BUSRESET: trace_esp_mem_writeb_cmd_bus_reset(val); + esp_bus_reset(s); if (!(s->wregs[ESP_CFG1] & CFG1_RESREPT)) { s->rregs[ESP_RINTR] |=3D INTR_RST; esp_raise_irq(s); --=20 2.25.1