On 2/24/21 2:12 PM, John Garry wrote: > On 22/02/2021 13:23, Hannes Reinecke wrote: >> void scsi_forget_host(struct Scsi_Host *shost) >> { >> - struct scsi_device *sdev; >> + struct scsi_device *sdev, *host_sdev = NULL; >> unsigned long flags; >> restart: >> spin_lock_irqsave(shost->host_lock, flags); >> list_for_each_entry(sdev, &shost->__devices, siblings) { >> + if (scsi_device_is_host_dev(sdev)) { >> + host_sdev = sdev; > > Is there actually a limit of 1x host_sdev always? > I would have thought so, as the whole point of having a host device is that you have a (virtual) device which simulates access to the host itself. And as such has a 1:1 relationship to the HBA. Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@xxxxxxx +49 911 74053 688 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), GF: Felix Imendörffer