scsi: smartpqi: Fix duplicate device nodes for tape changers
authorKevin Barnett <kevin.barnett@microchip.com>
Tue, 28 Sep 2021 23:54:40 +0000 (18:54 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 5 Oct 2021 04:13:15 +0000 (00:13 -0400)
commitd4dc6aea93cb40f454e3a4d0eb139633874d0f72
treee9a1287eab06394bd118f9382e2ec2a387b409b8
parent987d35605b7e82745bf69104611725d6505ed5a3
scsi: smartpqi: Fix duplicate device nodes for tape changers

Stop the OS from re-discovering multiple LUNs for tape drive and medium
changer.

Duplicate device nodes for Ultrium tape drive and medium changer are being
created.

The Ultrium tape drive is a multi-LUN SCSI target.  It presents a LUN for
the tape drive and a 2nd LUN for the medium changer.  Our controller FW
lists both LUNs in the RPL results.

As a result, the smartpqi driver exposes both devices to the OS. Then the
OS does its normal device discovery via the SCSI REPORT LUNS command, which
causes it to re-discover both devices a 2nd time, which results in the
duplicate device nodes.

Link: https://lore.kernel.org/r/20210928235442.201875-10-don.brace@microchip.com
Reviewed-by: Scott Benesh <scott.benesh@microchip.com>
Reviewed-by: Scott Teel <scott.teel@microchip.com>
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com>
Acked-by: John Donnelly <john.p.donnelly@oracle.com>
Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/smartpqi/smartpqi.h
drivers/scsi/smartpqi/smartpqi_init.c