diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-05 10:38:30 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-23 12:29:17 -0500 |
commit | d52b3815a52456dcf1a45fbc344e23bb643b2bda (patch) | |
tree | 75bd7c48501fc2e220e89115a3ec08a9cb829a59 /drivers/scsi | |
parent | fd1109711d7f76126e7cef947999f139b198dc15 (diff) |
[SCSI] add missing transport configure points for target and host
While trying to convert the SPI transport class to attribute groups, I
discovered that we don't actually have any transport configure points
for either the target or the host. This patch adds these missing
transport class triggers. The host one is simply done after the add,
the target one tries to be more clever and add it after devices may have
been placed on the target (so the device configure will have set up the
target parameters).
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi_scan.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_sysfs.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index ada72af0a6dd..1dc165ad17fb 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -1489,6 +1489,7 @@ struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel, | |||
1489 | if (scsi_host_scan_allowed(shost)) | 1489 | if (scsi_host_scan_allowed(shost)) |
1490 | scsi_probe_and_add_lun(starget, lun, NULL, &sdev, 1, hostdata); | 1490 | scsi_probe_and_add_lun(starget, lun, NULL, &sdev, 1, hostdata); |
1491 | mutex_unlock(&shost->scan_mutex); | 1491 | mutex_unlock(&shost->scan_mutex); |
1492 | transport_configure_device(&starget->dev); | ||
1492 | scsi_target_reap(starget); | 1493 | scsi_target_reap(starget); |
1493 | put_device(&starget->dev); | 1494 | put_device(&starget->dev); |
1494 | 1495 | ||
@@ -1569,6 +1570,7 @@ static void __scsi_scan_target(struct device *parent, unsigned int channel, | |||
1569 | out_reap: | 1570 | out_reap: |
1570 | /* now determine if the target has any children at all | 1571 | /* now determine if the target has any children at all |
1571 | * and if not, nuke it */ | 1572 | * and if not, nuke it */ |
1573 | transport_configure_device(&starget->dev); | ||
1572 | scsi_target_reap(starget); | 1574 | scsi_target_reap(starget); |
1573 | 1575 | ||
1574 | put_device(&starget->dev); | 1576 | put_device(&starget->dev); |
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 00b386677392..ed83cdb6e67d 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c | |||
@@ -1018,6 +1018,7 @@ int scsi_sysfs_add_host(struct Scsi_Host *shost) | |||
1018 | } | 1018 | } |
1019 | 1019 | ||
1020 | transport_register_device(&shost->shost_gendev); | 1020 | transport_register_device(&shost->shost_gendev); |
1021 | transport_configure_device(&shost->shost_gendev); | ||
1021 | return 0; | 1022 | return 0; |
1022 | } | 1023 | } |
1023 | 1024 | ||