From nobody Wed Feb 11 02:12:13 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1621419605; cv=none; d=zohomail.com; s=zohoarc; b=JtqMxzOGDWZmRkfUMDpmQt5LqahARgV1yahzH6zhgJLAOhBN2TL+9R2yzGeeNaghGflEkNb9ht/OEOCYikR51OL4ocnATLyQbRmtZ689SCfJiMokzcPPHjoE/gccoucVZtFdIhKxuQlDS5XS7npRWT65f8GTbffpKizO5dzjSHI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621419605; h=Content-Transfer-Encoding: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=kbZK5m3BCpSjpQe8GDyXv6TJDmVGZvNxglS+IYneNyc=; b=X7c3d74ETuO9pnkzvLvFZi3+E/CJKZCeyj7oz/mlhVFh/pZ+pTBQxDinwG3P9LHQM8j/uXkuB8xdPfP6BhZDu+x5X2sT5sgWQltNyxg5ZLTK4ffkRxeoQ8lOnr4rXZoR1G0et8nBVbGTSRpfRD2Eb/b9x3+/5lmmHar2c28Q8mY= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621419605990731.3907005655735; Wed, 19 May 2021 03:20:05 -0700 (PDT) Received: from localhost ([::1]:49970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljJJ6-0005RE-Rf for importer@patchew.org; Wed, 19 May 2021 06:20:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50084) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljJ7k-0002dV-4C for qemu-devel@nongnu.org; Wed, 19 May 2021 06:08:20 -0400 Received: from mail.ilande.co.uk ([2001:41c9:1:41f::167]:37260 helo=mail.default.ilande.bv.iomart.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljJ7h-0003Hu-5Z for qemu-devel@nongnu.org; Wed, 19 May 2021 06:08:19 -0400 Received: from host217-39-58-213.range217-39.btcentralplus.com ([217.39.58.213] helo=kentang.home) by mail.default.ilande.bv.iomart.io with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ljJ7e-0001Gv-Td; Wed, 19 May 2021 11:08:15 +0100 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, pbonzini@redhat.com, fam@euphon.net, laurent@vivier.eu, hpoussin@reactos.org Date: Wed, 19 May 2021 11:08:02 +0100 Message-Id: <20210519100803.10293-5-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210519100803.10293-1-mark.cave-ayland@ilande.co.uk> References: <20210519100803.10293-1-mark.cave-ayland@ilande.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 217.39.58.213 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk Subject: [PATCH 4/5] esp: revert 75ef849696 "esp: correctly fill bus id with requested lun" X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.default.ilande.bv.iomart.io) 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=2001:41c9:1:41f::167; envelope-from=mark.cave-ayland@ilande.co.uk; helo=mail.default.ilande.bv.iomart.io X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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.23 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" Content-Type: text/plain; charset="utf-8" This commit from nearly 10 years ago no longer appears to be required and i= n its current form prevents the MacOS CDROM driver from detecting the CDROM drive= . The error is caused by the MacOS CDROM driver sending this CDB without DMA: 0x12 0x00 0x00 0x00 0x05 0x00 (INQUIRY) This is a valid INQUIRY command, however with this logic present the 3rd by= te (0x0) is copied over the 1st byte (0x12) which silently converts the INQUIRY command to a TEST UNIT READY command before passing it to the QEMU SCSI lay= er. Since the TEST UNIT READY command has a zero length response the MacOS CDROM driver never receives a response and assumes the CDROM is not present. Resolve the issue by reverting the original commit which I'm fairly sure is= now obsolete so that the original MacOS CDB is passed unaltered to the QEMU SCSI layer. Signed-off-by: Mark Cave-Ayland --- hw/scsi/esp.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index afb4a7f9f1..a6f7c6c1bf 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -260,9 +260,6 @@ static uint32_t get_cmd(ESPState *s, uint32_t maxlen) return 0; } n =3D esp_fifo_pop_buf(&s->fifo, buf, dmalen); - if (n >=3D 3) { - buf[0] =3D buf[2] >> 5; - } n =3D MIN(fifo8_num_free(&s->cmdfifo), n); fifo8_push_all(&s->cmdfifo, buf, n); } --=20 2.20.1