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>
if (scsi_host_scan_allowed(shost))
scsi_probe_and_add_lun(starget, lun, NULL, &sdev, 1, hostdata);
mutex_unlock(&shost->scan_mutex);
+ transport_configure_device(&starget->dev);
scsi_target_reap(starget);
put_device(&starget->dev);
out_reap:
/* now determine if the target has any children at all
* and if not, nuke it */
+ transport_configure_device(&starget->dev);
scsi_target_reap(starget);
put_device(&starget->dev);
}
transport_register_device(&shost->shost_gendev);
+ transport_configure_device(&shost->shost_gendev);
return 0;
}