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