diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2009-07-13 09:06:11 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-07-30 09:49:58 -0400 |
commit | 379d6bf6573ee6541a38bbe9140c1f0b94e3feae (patch) | |
tree | fb6d0c117d835eb7f6361ff4b00f05f8879589cb /drivers/s390 | |
parent | cbf1ed0264da104573458aedc220ebfcd02567f6 (diff) |
[SCSI] zfcp: Add port only once to FC transport class
When calling fc_remote_port_add make sure to not call it again before
fc_remote_port_delete has been called. In other words, ensure to
create a new fc_rport, then delete it, then create a new one again.
Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/scsi/zfcp_scsi.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index 967ede73f4c5..ba32709921a4 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
@@ -534,6 +534,9 @@ static void zfcp_scsi_rport_register(struct zfcp_port *port) | |||
534 | struct fc_rport_identifiers ids; | 534 | struct fc_rport_identifiers ids; |
535 | struct fc_rport *rport; | 535 | struct fc_rport *rport; |
536 | 536 | ||
537 | if (port->rport) | ||
538 | return; | ||
539 | |||
537 | ids.node_name = port->wwnn; | 540 | ids.node_name = port->wwnn; |
538 | ids.port_name = port->wwpn; | 541 | ids.port_name = port->wwpn; |
539 | ids.port_id = port->d_id; | 542 | ids.port_id = port->d_id; |
@@ -557,8 +560,10 @@ static void zfcp_scsi_rport_block(struct zfcp_port *port) | |||
557 | { | 560 | { |
558 | struct fc_rport *rport = port->rport; | 561 | struct fc_rport *rport = port->rport; |
559 | 562 | ||
560 | if (rport) | 563 | if (rport) { |
561 | fc_remote_port_delete(rport); | 564 | fc_remote_port_delete(rport); |
565 | port->rport = NULL; | ||
566 | } | ||
562 | } | 567 | } |
563 | 568 | ||
564 | void zfcp_scsi_schedule_rport_register(struct zfcp_port *port) | 569 | void zfcp_scsi_schedule_rport_register(struct zfcp_port *port) |