mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
scsi: scsi_transport_fc: set scsi_target_id upon rescan
When an rport is found in the bindings array there is no guarantee that it had been a target port, so we need to call fc_remote_port_rolechg() here to ensure the scsi_target_id is set correctly. Otherwise the port will never be scanned. Signed-off-by: Hannes Reinecke <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Tested-by: Chad Dupuis <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
This commit is contained in:
parent
c88f0e6b06
commit
675195d0be
1 changed files with 1 additions and 10 deletions
|
|
@ -2876,7 +2876,6 @@ fc_remote_port_add(struct Scsi_Host *shost, int channel,
|
|||
memcpy(&rport->port_name, &ids->port_name,
|
||||
sizeof(rport->port_name));
|
||||
rport->port_id = ids->port_id;
|
||||
rport->roles = ids->roles;
|
||||
rport->port_state = FC_PORTSTATE_ONLINE;
|
||||
rport->flags &= ~FC_RPORT_FAST_FAIL_TIMEDOUT;
|
||||
|
||||
|
|
@ -2885,15 +2884,7 @@ fc_remote_port_add(struct Scsi_Host *shost, int channel,
|
|||
fci->f->dd_fcrport_size);
|
||||
spin_unlock_irqrestore(shost->host_lock, flags);
|
||||
|
||||
if (ids->roles & FC_PORT_ROLE_FCP_TARGET) {
|
||||
scsi_target_unblock(&rport->dev, SDEV_RUNNING);
|
||||
|
||||
/* initiate a scan of the target */
|
||||
spin_lock_irqsave(shost->host_lock, flags);
|
||||
rport->flags |= FC_RPORT_SCAN_PENDING;
|
||||
scsi_queue_work(shost, &rport->scan_work);
|
||||
spin_unlock_irqrestore(shost->host_lock, flags);
|
||||
}
|
||||
fc_remote_port_rolechg(rport, ids->roles);
|
||||
return rport;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue