Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3730135pxv; Mon, 28 Jun 2021 11:21:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJza4lv+VTEpBBbBGkSA75h71p4359A0q/0POeZ7UaOUJveIBYzPQrn+lNxdSJN6HZBxq7fT X-Received: by 2002:a17:906:144e:: with SMTP id q14mr25803247ejc.19.1624904459942; Mon, 28 Jun 2021 11:20:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624904459; cv=none; d=google.com; s=arc-20160816; b=oeD8DI2tSpkDHo6eKhkUwTCHLo9QQEY3/aT5p3KhjKoNWZ3m3iKsUCq7X18cI0Hm7y n0J/QwYoUQSCFiBVlHAHVmPiAa4/N2F/R0yjzOvb4thApFe9MHNePwrJqxhYfpq+tfc3 1cPy41hp+euEigosgujPb0lMsT1zTG9LqhKDARrQB216rtr8TWz8VJORnJuw/YLgKM4q thPUG0SEqIoUUMMZKxBL5CRliUBjbFwgHCSgyq0eeZ845bIzw4b5rFvga+AM5soUJRNP iTXG6pUP6QIa0c11b2qV/Ak2tAp/iF15VlWGfemV8ARAKKaW4vuUCVDx/ixS211qOhOY RhWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=L4HsuFpvz9xtBiqohMTNzyM9BISd8yGrD+tv1QKt8nA=; b=M9c7fGTne5MJj1eLXV7/0XntiMgA//a/OUW8ysQaJ+Rb2cgy8eDqM3bRRuOyewWLUI PkI1CGxfvKQYW47RojXPP63rB7l8hU7HKf+yR5CxeHofYxY+vt68Xd+NFaGakNlLpk0z LzSdmd8exQaY+1rPiZ8UIae8GSA1wcsthHLvdF3U8SqzmaYCtQr2SE3NURc/ddQUalw9 5NlV4JfavPvTB5Vs3EIbzNOp4MG4Rv0HkHNaDhGRoG/kvq22dKnsvocvDJZ9NcV/aJWK Wg75wWfLIrnm+03tPi2b9URXEncLs1AFJEPFAqbX4ZgWBb2OQyKjfWccuhkoLc2e3kSY gquA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id be18si15491666edb.126.2021.06.28.11.20.35; Mon, 28 Jun 2021 11:20:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233927AbhF1Omb (ORCPT + 99 others); Mon, 28 Jun 2021 10:42:31 -0400 Received: from netrider.rowland.org ([192.131.102.5]:57635 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S234871AbhF1OeY (ORCPT ); Mon, 28 Jun 2021 10:34:24 -0400 Received: (qmail 658330 invoked by uid 1000); 28 Jun 2021 10:31:58 -0400 Date: Mon, 28 Jun 2021 10:31:58 -0400 From: Alan Stern To: "i.kononenko" Cc: Felipe Balbi , Greg Kroah-Hartman , Jens Axboe , openbmc@lists.ozlabs.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/6] fms: Add TOC/PMA/ATIP DVD-ROM capabilities Message-ID: <20210628143158.GD656159@rowland.harvard.edu> References: <20210626211820.107310-1-i.kononenko@yadro.com> <20210626211820.107310-4-i.kononenko@yadro.com> <20210627142952.GE624763@rowland.harvard.edu> <3f9c6e4a-18b7-db11-8b23-f0473a649d06@yadro.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3f9c6e4a-18b7-db11-8b23-f0473a649d06@yadro.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 27, 2021 at 09:45:07PM +0300, i.kononenko wrote: > > > On 27.06.2021 17:29, Alan Stern wrote: > > Is any of this really needed? What usage scenarios require > > f_mass_storage to emulate a DVD-ROM that couldn't use f_tcm instead? > > I can't see any impediments to supplement the already existing > implementation of MMC-(2/3) specification of multimedia devices to > represent the DVD/BD features. If the kernel presents the CD-ROM SCSI > commands, why the mass_storage:usb-gadget-function still doesn't include > that for DVD/BD? > > Many modern embedded systems (e.g., BMC, OpenBMC) implements their > required features, e.g., Virtual Media Device, which is based on the > usb:gadget:mass-storage. > The purpose of that features is extensive, and their use the mass-storage > not only as a cdrom-device. > > The required features of such systems might expect image back-end files > that size is significant than 2.1Gb, but such medium is not the CD-ROM > device. USB-gadget consumers can incorrectly interpret such device by > loading the wrong driver. I believe that should be the DVD-medium device, > at least. You should include this information in the patch description, so that people will understand why you wrote the patch. > Additionally, please note the current patch also fixes the incorrect > implementation of retrieving TOC/PMA/ATIP data, which is required for the > CD-ROM. One system might correct works with retrieving first with the > last session together, but for some systems, e.g., OS ESXi, OS Windows, > should retrieving first and last border sessions in separate SCSI-request. What's wrong with the existing implementation? Are you talking about the do_read_toc function? The driver only supports one session in any case. In general, fixes to existing code and additions of new code should go in separate patches. Alan Stern