@@ -363,9 +363,11 @@ int core_enable_device_list_for_node(
rcu_read_lock();
hlist_for_each_entry_rcu(tmp, &nacl->lun_entry_hlist, link) {
if (tmp == new)
- continue;
- core_scsi3_ua_allocate(tmp, 0x3F,
- ASCQ_3FH_REPORTED_LUNS_DATA_HAS_CHANGED);
+ core_scsi3_ua_allocate(tmp, 0x29,
+ ASCQ_29H_POWER_ON_RESET_OR_BUS_DEVICE_RESET_OCCURED);
+ else
+ core_scsi3_ua_allocate(tmp, 0x3F,
+ ASCQ_3FH_REPORTED_LUNS_DATA_HAS_CHANGED);
}
rcu_read_unlock();
@@ -385,9 +387,11 @@ int core_enable_device_list_for_node(
rcu_read_lock();
hlist_for_each_entry_rcu(tmp, &nacl->lun_entry_hlist, link) {
if (tmp == new)
- continue;
- core_scsi3_ua_allocate(tmp, 0x3F,
- ASCQ_3FH_REPORTED_LUNS_DATA_HAS_CHANGED);
+ core_scsi3_ua_allocate(tmp, 0x29,
+ ASCQ_29H_POWER_ON_RESET_OR_BUS_DEVICE_RESET_OCCURED);
+ else
+ core_scsi3_ua_allocate(tmp, 0x3F,
+ ASCQ_3FH_REPORTED_LUNS_DATA_HAS_CHANGED);
}
rcu_read_unlock();
return 0;
Whenever a LUN is being assigned we should be sending out an Power-On/Reset UA. Signed-off-by: Hannes Reinecke <hare@suse.de> --- drivers/target/target_core_device.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)