aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorMartin Petermann <martin.petermann@de.ibm.com>2009-04-17 09:08:13 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-04-27 11:07:35 -0400
commit6ab35c0713daf8cd68f272a4be8dfc02c86bbd3b (patch)
treea7baf0ddc4d7f92f458b10b07e8da5616a5ffdc4 /drivers/s390
parent7001f0c4863230dd1560425fa0f5aad9e21716b8 (diff)
[SCSI] zfcp: Fix port reference counting
If this problem appears zfcp ports cannot be de-queued since it is checked for a zero refcount. The port reference counting is wrong for existing zfcp ports when e.g. an adapter gets on-line again. During port scanning the reference counting for existing ports should not be changed. Signed-off-by: Martin Petermann <martin.petermann@de.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_fc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c
index db409684e06f..19ae0842047c 100644
--- a/drivers/s390/scsi/zfcp_fc.c
+++ b/drivers/s390/scsi/zfcp_fc.c
@@ -539,6 +539,9 @@ static void zfcp_validate_port(struct zfcp_port *port)
539{ 539{
540 struct zfcp_adapter *adapter = port->adapter; 540 struct zfcp_adapter *adapter = port->adapter;
541 541
542 if (!(atomic_read(&port->status) & ZFCP_STATUS_COMMON_NOESC))
543 return;
544
542 atomic_clear_mask(ZFCP_STATUS_COMMON_NOESC, &port->status); 545 atomic_clear_mask(ZFCP_STATUS_COMMON_NOESC, &port->status);
543 546
544 if ((port->supported_classes != 0) || 547 if ((port->supported_classes != 0) ||
@@ -599,10 +602,8 @@ static int zfcp_scan_eval_gpn_ft(struct zfcp_gpn_ft *gpn_ft, int max_entries)
599 if (acc->wwpn == fc_host_port_name(adapter->scsi_host)) 602 if (acc->wwpn == fc_host_port_name(adapter->scsi_host))
600 continue; 603 continue;
601 port = zfcp_get_port_by_wwpn(adapter, acc->wwpn); 604 port = zfcp_get_port_by_wwpn(adapter, acc->wwpn);
602 if (port) { 605 if (port)
603 zfcp_port_get(port);
604 continue; 606 continue;
605 }
606 607
607 port = zfcp_port_enqueue(adapter, acc->wwpn, 608 port = zfcp_port_enqueue(adapter, acc->wwpn,
608 ZFCP_STATUS_COMMON_NOESC, d_id); 609 ZFCP_STATUS_COMMON_NOESC, d_id);