From nobody Wed Nov 27 02:34:47 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=none dis=none) header.from=samsung.com ARC-Seal: i=1; a=rsa-sha256; t=1702045097; cv=none; d=zohomail.com; s=zohoarc; b=nTBLmmFp86vLz/oDD0fcq6/UrKqRLvaREY3jNxh5tg3v2JfpB7pqWdQpSQ1JKAzXj3P4kLQjz99VIEds0GIAUtFu0j0xuhfAMN0gnCiwex1e7vmO8zmY5g+SUrJrQJrIO2SlhAoLRxX76+NymXASmuXm16YQLcTEO2Ueq3ew78s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1702045097; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=/oUHa5D5McJvgpsJoL1q2msPaWi0JVoTytyZRDHtkBQ=; b=l0qwjSjOUYAqWQGIiJPufMj5O1Lcd0ZgeXq6VogWx25nVQmZ+cciKxewwOj4uOp3mqo39l7rcIEIK8AImRG+Cf4hoF568FC7CAGrk2AX7CpGn/MdTF4SP+CUvmJvjm+BD/6A4g2KyVU6ctfJt/fK3ZyIZJRFzY+atfnjpQjrpQA= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1702045097109745.5747313301405; Fri, 8 Dec 2023 06:18:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBbfw-0005pk-Lw; Fri, 08 Dec 2023 09:17:57 -0500 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 1rBUFC-0007nl-EY for qemu-devel@nongnu.org; Fri, 08 Dec 2023 01:21:52 -0500 Received: from mailout2.samsung.com ([203.254.224.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBUF7-0000Q2-2U for qemu-devel@nongnu.org; Fri, 08 Dec 2023 01:21:50 -0500 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20231208062140epoutp02d5ab9467e42fa10d40fe86ab6b11125c~exv1SjWqc0059900599epoutp02e for ; Fri, 8 Dec 2023 06:21:40 +0000 (GMT) Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20231208062140epcas2p2857c08ad9ae41ce4296dd5b47d06c29c~exv03rONa0880008800epcas2p2J; Fri, 8 Dec 2023 06:21:40 +0000 (GMT) Received: from epsmgec2p1-new.samsung.com (unknown [182.195.36.91]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4SmgyW3T0Nz4x9Q1; Fri, 8 Dec 2023 06:21:39 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmgec2p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id 80.FB.18994.3F5B2756; Fri, 8 Dec 2023 15:21:39 +0900 (KST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20231208062140epoutp02d5ab9467e42fa10d40fe86ab6b11125c~exv1SjWqc0059900599epoutp02e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1702016500; bh=/oUHa5D5McJvgpsJoL1q2msPaWi0JVoTytyZRDHtkBQ=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=nj3XhyxjFTRMQS+9oVlXjIZTbuGLQlDOHmmC50SNjcoQSUILLmgDW0QHkI+QQNbXe Cg4/hUlXc2F0174lS5sHMh0So+Tb8dhovOKP3/J7dL/NoT+likIsqbjAjlFwapUe2/ 6FTewrkQaqIQ+wVpg5ILDXSfeq7lUzSWmO3e9LC4= X-AuditID: b6c32a4d-9f7ff70000004a32-fb-6572b5f3abc6 Mime-Version: 1.0 Subject: [PATCH 2/3] hw/scsi: add mode sense support for zbc device From: Daejun Park To: "pbonzini@redhat.com" , "fam@euphon.net" , Jeuk Kim , "qemu-devel@nongnu.org" , Daejun Park CC: Seokhwan Kim , Yonggil Song , JinHwan Park X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20231208060902epcms2p3810b29fefbddaf16a7f3f2758cf218ba@epcms2p3> X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20231208062038epcms2p4d1783b8366059c392b0e8ea7a7eb4c9f@epcms2p4> Date: Fri, 08 Dec 2023 15:20:38 +0900 X-CMS-MailID: 20231208062038epcms2p4d1783b8366059c392b0e8ea7a7eb4c9f Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P X-CPGSPASS: Y X-CPGSPASS: Y X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjk+LIzCtJLcpLzFFi42LZdljTTPfz1qJUg+bfkhYvD2larHoQbnFl /3lGi/tbrzFa9P9rZ7HYv+0fq8Xx3h0sFqs65jJaTD1/hMmB0+PHuXY2jyfXNjN5vN93lc2j b8sqxgCWqGybjNTElNQihdS85PyUzLx0WyXv4HjneFMzA0NdQ0sLcyWFvMTcVFslF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MS-RootMailID: 20231208060902epcms2p3810b29fefbddaf16a7f3f2758cf218ba References: <20231208060902epcms2p3810b29fefbddaf16a7f3f2758cf218ba@epcms2p3> 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=203.254.224.25; envelope-from=daejun7.park@samsung.com; helo=mailout2.samsung.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, UPPERCASE_50_75=0.008 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 08 Dec 2023 09:17:30 -0500 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: , Reply-To: daejun7.park@samsung.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @samsung.com) X-ZM-MESSAGEID: 1702045099277100004 This patch enables mode sense for zbc devices. Signed-off-by: Daejun Park --- hw/scsi/scsi-disk.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 6691f5edb8..f1ecb77317 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -1083,11 +1083,14 @@ static int mode_sense_page(SCSIDiskState *s, int pa= ge, uint8_t **p_outbuf, int page_control) { static const int mode_sense_valid[0x3f] =3D { - [MODE_PAGE_VENDOR_SPECIFIC] =3D (1 << TYPE_DISK) | (1 << TY= PE_ROM), - [MODE_PAGE_HD_GEOMETRY] =3D (1 << TYPE_DISK), - [MODE_PAGE_FLEXIBLE_DISK_GEOMETRY] =3D (1 << TYPE_DISK), - [MODE_PAGE_CACHING] =3D (1 << TYPE_DISK) | (1 << TY= PE_ROM), - [MODE_PAGE_R_W_ERROR] =3D (1 << TYPE_DISK) | (1 << TY= PE_ROM), + [MODE_PAGE_VENDOR_SPECIFIC] =3D (1 << TYPE_DISK) | (1 << TY= PE_ROM) + | (1 << TYPE= _ZBC), + [MODE_PAGE_HD_GEOMETRY] =3D (1 << TYPE_DISK) | (1 << TY= PE_ZBC), + [MODE_PAGE_FLEXIBLE_DISK_GEOMETRY] =3D (1 << TYPE_DISK) | (1 << TY= PE_ZBC), + [MODE_PAGE_CACHING] =3D (1 << TYPE_DISK) | (1 << TY= PE_ROM) + | (1 << TYPE= _ZBC), + [MODE_PAGE_R_W_ERROR] =3D (1 << TYPE_DISK) | (1 << TY= PE_ROM) + | (1 << TYPE= _ZBC), [MODE_PAGE_AUDIO_CTL] =3D (1 << TYPE_ROM), [MODE_PAGE_CAPABILITIES] =3D (1 << TYPE_ROM), [MODE_PAGE_APPLE_VENDOR] =3D (1 << TYPE_ROM), --=20 2.25.1