Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3156553ybg; Thu, 24 Oct 2019 23:15:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzhGmh9wofLc2NQe4C6zgQjDfLjkw/+Cjw6tjOVFRrSu91ZuLZ71h7TetJ79+rPhFRBDP8s X-Received: by 2002:a17:906:1d59:: with SMTP id o25mr1807350ejh.115.1571984105813; Thu, 24 Oct 2019 23:15:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571984105; cv=none; d=google.com; s=arc-20160816; b=qUmxVmRdWMXep1ojRv4fVcdTPUYZW9lDlEyltoM/PZ3LLv9wmgEKMrgHiJzUxdOsxV ao0h3Y4TWG7ZrHNhMek4Zi4bQT6ito6syfLs5PyKJGe4RLwyK6TkJWMzgYNwedTt4ylH SIpmUai0DeK7dIPUlBUlogSosCYTb3ugnjKfPQClLVnc1aAJRTtRYQ6ZKHl1kbzPf2lp qAiK0h5oZwjqYlY7V9Tt+US/8Zx/HxFoTQ6NBMa28gpRuvxOAA4Acbc19xiCpuPU+9Ev zIRHeuFcCy13TXrm0bwt6XrKYJVa8IsUEm9UDy1eDejhhioKFLARQq0GFL0xebWEjOuS ueXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=iMwRjs8rRQc2Ec2uTw0zygq3ugJBV3jAJK7ckokcpfU=; b=Xc08Pr0/KbwlrowWiUBkgX0Zqx2ubBuewMxY+uPGAiGJ2INWizrePgjaSgFix2Yf9S hwO30/6LVU/I6ETCncDPjKqEeTvzsjNWewd730BZ3lPBcUfPSIhn+MlRv8lgntJhyHnS CEI3BCTqRxUvfS2jzmKGOyd5A+7f5acv812mPhtGIFDTXDie9PjcKZhJISqj7wHD4arz EsG3Bt9nydtkDAXoo9TPpWPatt49m7DUwUvc18ypISioH71b7i/TzZxAQvmjJlkBBx6w 7p+q2kZQ3LqPzi5MlYdBfEFoLM5iShKgJ7JH7+j6Bqui30+A5CJKm177wMdcOHJOMKXm 7lbw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z41si606366edb.166.2019.10.24.23.14.41; Thu, 24 Oct 2019 23:15:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391401AbfJXJlm (ORCPT + 99 others); Thu, 24 Oct 2019 05:41:42 -0400 Received: from mx2.suse.de ([195.135.220.15]:36690 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727275AbfJXJlm (ORCPT ); Thu, 24 Oct 2019 05:41:42 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 6A373B66D; Thu, 24 Oct 2019 09:41:39 +0000 (UTC) Subject: Re: [PATCH v2 7/8] scsi: sr: workaround VMware ESXi cdrom emulation bug To: =?UTF-8?Q?Michal_Such=c3=a1nek?= Cc: linux-scsi@vger.kernel.org, Jonathan Corbet , Jens Axboe , "James E.J. Bottomley" , "Martin K. Petersen" , Alexander Viro , Mauro Carvalho Chehab , Eric Biggers , "J. Bruce Fields" , Benjamin Coddington , Hannes Reinecke , Omar Sandoval , Ming Lei , Damien Le Moal , Bart Van Assche , Tejun Heo , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org References: <08f1e291-0196-2402-1947-c0cdaaf534da@suse.de> <20191023162313.GE938@kitsune.suse.cz> <2bc50e71-6129-a482-00bd-0425b486ce07@suse.de> <20191024085631.GJ938@kitsune.suse.cz> From: Hannes Reinecke Openpgp: preference=signencrypt Autocrypt: addr=hare@suse.de; prefer-encrypt=mutual; keydata= mQINBE6KyREBEACwRN6XKClPtxPiABx5GW+Yr1snfhjzExxkTYaINHsWHlsLg13kiemsS6o7 qrc+XP8FmhcnCOts9e2jxZxtmpB652lxRB9jZE40mcSLvYLM7S6aH0WXKn8bOqpqOGJiY2bc 6qz6rJuqkOx3YNuUgiAxjuoYauEl8dg4bzex3KGkGRuxzRlC8APjHlwmsr+ETxOLBfUoRNuE b4nUtaseMPkNDwM4L9+n9cxpGbdwX0XwKFhlQMbG3rWA3YqQYWj1erKIPpgpfM64hwsdk9zZ QO1krgfULH4poPQFpl2+yVeEMXtsSou915jn/51rBelXeLq+cjuK5+B/JZUXPnNDoxOG3j3V VSZxkxLJ8RO1YamqZZbVP6jhDQ/bLcAI3EfjVbxhw9KWrh8MxTcmyJPn3QMMEp3wpVX9nSOQ tzG72Up/Py67VQe0x8fqmu7R4MmddSbyqgHrab/Nu+ak6g2RRn3QHXAQ7PQUq55BDtj85hd9 W2iBiROhkZ/R+Q14cJkWhzaThN1sZ1zsfBNW0Im8OVn/J8bQUaS0a/NhpXJWv6J1ttkX3S0c QUratRfX4D1viAwNgoS0Joq7xIQD+CfJTax7pPn9rT////hSqJYUoMXkEz5IcO+hptCH1HF3 qz77aA5njEBQrDRlslUBkCZ5P+QvZgJDy0C3xRGdg6ZVXEXJOQARAQABtCpIYW5uZXMgUmVp bmVja2UgKFN1U0UgTGFicykgPGhhcmVAc3VzZS5kZT6JAkEEEwECACsCGwMFCRLMAwAGCwkI BwMCBhUIAgkKCwQWAgMBAh4BAheABQJOisquAhkBAAoJEGz4yi9OyKjPO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-a62d780896da@suse.de> Date: Thu, 24 Oct 2019 11:41:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20191024085631.GJ938@kitsune.suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/24/19 10:56 AM, Michal Suchánek wrote: > On Thu, Oct 24, 2019 at 07:46:57AM +0200, Hannes Reinecke wrote: >> On 10/23/19 6:23 PM, Michal Suchánek wrote: >>> On Wed, Oct 23, 2019 at 04:13:15PM +0200, Hannes Reinecke wrote: [ .. ]>>>> This looks something which should be handled via a blacklist flag, not >>>> some inline hack which everyone forgets about it... >>> >>> AFAIK we used to have a blacklist but don't have anymore. So either it >>> has to be resurrected for this one flag or an inline hack should be good >>> enough. >>> >> But we do have one for generic scsi; cf drivers/scsi/scsi_devinfo.c. >> And this pretty much falls into the category of SCSI quirks, so I'd >> prefer have it hooked into that. > > But generic scsi does not know about cdrom trays, does it? > No, just about 'flags'. What you _do_ with those flags is up to you. Or, rather, the driver. Just define a 'tray detection broken' flag, and evaluate it in sr.c. Where is the problem with that? Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@suse.de +49 911 74053 688 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 247165 (AG München), GF: Felix Imendörffer