Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3218403ybg; Fri, 25 Oct 2019 00:34:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGdcikelGYtdsbyUZDb1FyRm1m/KfBFeGTEIN0JDkduoWwNrTlY3nt7TGlab9xfKHktHCm X-Received: by 2002:a17:906:55d1:: with SMTP id z17mr2037878ejp.300.1571988860173; Fri, 25 Oct 2019 00:34:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571988860; cv=none; d=google.com; s=arc-20160816; b=Ng7NZrX7fIJwOPi4niibHE3gnWcS0ZmMNWpA774xuBH7sHSh4T5DxL2387tmZXnpNx 9pS8TxDoXEeDIrUaDyzq2wYhEv2qKB9BmCnCnY2jVNH08z2voLaq+31hsSpTJ0qXiRDV WlkADB7ROUzSuyqBMvTsQoufHAdlyEr+9vkdfkEC1B40pzuWdf2OAgLSnmdlXV8QguFA K3TBIUjxlwX8wEGRP3YMEvSB4Q05Y0PySZVxhYZ+8mu4fiWBqeitXF066ZhsLGdxOD6h fZiLfD6CU4FQfn682OfA7lOYEtACbaqqRASy6551fEDhUDtr5sv2C2MJ7sv0OvXLZfi8 pKTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=PnNDwrr8HU0BkPd+tC72z6djRQlN8vje7xcEd/zOnf0=; b=ZFcvNtBir6FBJM13hkLTojg7nwWtpBc2OKyoTlzfOUYUVk4cRvYydcc1yiUSGChWUB 4o8n0zZypCa2DIFQR5FNC+Q8IGeTy0pqZDJjw2lJsul1FpFw1to5HJ6b3M79ZD7QJcCy vYQpGCW41lbTE3kt/6lB+RJun+veHU8ONrhvjAE2sbkfYfra9dYDkIRRWF+5FVEvKsCL f9Ewnm6qWoUExoSHEH3zh0rd/0IrAfjZ3sLMXJZJ26A3rtCGIg4/ILEaVBi0Cstv4Ut2 oXV0GLWgDrIfgleZEiDTisXzDhdZ6Vr8hePV8T7BmU/PyTHZtW49fUxzMs6zzP/C1OCQ h9nw== 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 rk26si730763ejb.303.2019.10.25.00.33.56; Fri, 25 Oct 2019 00:34:20 -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 S2405567AbfJXKLR (ORCPT + 99 others); Thu, 24 Oct 2019 06:11:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:56916 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390611AbfJXKLQ (ORCPT ); Thu, 24 Oct 2019 06:11:16 -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 89A03B68C; Thu, 24 Oct 2019 10:11:14 +0000 (UTC) Date: Thu, 24 Oct 2019 12:11:12 +0200 From: Michal =?iso-8859-1?Q?Such=E1nek?= To: Hannes Reinecke 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 Subject: Re: [PATCH v2 7/8] scsi: sr: workaround VMware ESXi cdrom emulation bug Message-ID: <20191024101112.GK938@kitsune.suse.cz> 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> <15c972ea-5b3a-487f-7be5-a62d780896da@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <15c972ea-5b3a-487f-7be5-a62d780896da@suse.de> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 24, 2019 at 11:41:38AM +0200, Hannes Reinecke wrote: > 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? And how do you set the flag? The blacklist lists exact manufacturer and model while this rule only depends on model because manufacturer is bogus. Also the blacklist itself is deprecated: /* * scsi_static_device_list: deprecated list of devices that require * settings that differ from the default, includes black-listed (broken) * devices. The entries here are added to the tail of scsi_dev_info_list * via scsi_dev_info_list_init. * * Do not add to this list, use the command line or proc interface to add * to the scsi_dev_info_list. This table will eventually go away. */ Thanks Michal