Skip to contentSkip to conversation

Attach VPD page after slave_configure()

PATCH New Hannes Reinecke 1 participant 1 message Mar 21, 2014 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Attach VPD page after slave_configure()

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

---
 drivers/scsi/scsi_scan.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/scsi_scan.c +3 -3
index 1bac49d..27f96d5 100644
@@ -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;
 
 	/*
Signature · 1 line
1.7.12.4