The LLDD might disable the LUN in slave_configure(), so we should
attach the VPD pages afterwards.

Signed-off-by: Hannes Reinecke <h...@suse.de>
---
 drivers/scsi/scsi_scan.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 1bac49d..27f96d5 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -953,9 +953,6 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned 
char *inq_result,
        if (*bflags & BLIST_SKIP_VPD_PAGES)
                sdev->skip_vpd_pages = 1;
 
-       if (sdev->scsi_level >= SCSI_3)
-               scsi_attach_vpd(sdev);
-
        transport_configure_device(&sdev->sdev_gendev);
 
        if (sdev->host->hostt->slave_configure) {
@@ -973,6 +970,9 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned 
char *inq_result,
                }
        }
 
+       if (sdev->scsi_level >= SCSI_3)
+               scsi_attach_vpd(sdev);
+
        sdev->max_queue_depth = sdev->queue_depth;
 
        /*
-- 
1.7.12.4

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to