diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2008-12-19 10:56:59 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-12-29 12:38:28 -0500 |
commit | b98478d71b0fea6d35f96069612d92b76013589f (patch) | |
tree | 777baa61dd1017d086e8a4dd3b3b9079a1116f39 /drivers/s390/scsi/zfcp_erp.c | |
parent | e0d7fcb5ecad495a54f7334e410f5e16e1da7f78 (diff) |
[SCSI] zfcp: remove DID_DID flag
The port flag DID_DID indicates whether we know the current id of the
port. This is always set in parallel. Since the id 0 is invalid
(because the port id 0 is invalid) we can remove the DID_DID flag:
d_id of 0 indicates an invalid d_id != 0 is a valid one.
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Acked-by: Felix Beck <felix@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_erp.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_erp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 495a4a33e37d..387a3af528ac 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c | |||
@@ -840,7 +840,6 @@ static int zfcp_erp_open_ptp_port(struct zfcp_erp_action *act) | |||
840 | return ZFCP_ERP_FAILED; | 840 | return ZFCP_ERP_FAILED; |
841 | } | 841 | } |
842 | port->d_id = adapter->peer_d_id; | 842 | port->d_id = adapter->peer_d_id; |
843 | atomic_set_mask(ZFCP_STATUS_PORT_DID_DID, &port->status); | ||
844 | return zfcp_erp_port_strategy_open_port(act); | 843 | return zfcp_erp_port_strategy_open_port(act); |
845 | } | 844 | } |
846 | 845 | ||
@@ -871,12 +870,12 @@ static int zfcp_erp_port_strategy_open_common(struct zfcp_erp_action *act) | |||
871 | case ZFCP_ERP_STEP_PORT_CLOSING: | 870 | case ZFCP_ERP_STEP_PORT_CLOSING: |
872 | if (fc_host_port_type(adapter->scsi_host) == FC_PORTTYPE_PTP) | 871 | if (fc_host_port_type(adapter->scsi_host) == FC_PORTTYPE_PTP) |
873 | return zfcp_erp_open_ptp_port(act); | 872 | return zfcp_erp_open_ptp_port(act); |
874 | if (!(p_status & ZFCP_STATUS_PORT_DID_DID)) { | 873 | if (!port->d_id) { |
875 | queue_work(zfcp_data.work_queue, &port->gid_pn_work); | 874 | queue_work(zfcp_data.work_queue, &port->gid_pn_work); |
876 | return ZFCP_ERP_CONTINUES; | 875 | return ZFCP_ERP_CONTINUES; |
877 | } | 876 | } |
878 | case ZFCP_ERP_STEP_NAMESERVER_LOOKUP: | 877 | case ZFCP_ERP_STEP_NAMESERVER_LOOKUP: |
879 | if (!(p_status & ZFCP_STATUS_PORT_DID_DID)) { | 878 | if (!port->d_id) { |
880 | if (p_status & (ZFCP_STATUS_PORT_INVALID_WWPN)) { | 879 | if (p_status & (ZFCP_STATUS_PORT_INVALID_WWPN)) { |
881 | zfcp_erp_port_failed(port, 26, NULL); | 880 | zfcp_erp_port_failed(port, 26, NULL); |
882 | return ZFCP_ERP_EXIT; | 881 | return ZFCP_ERP_EXIT; |
@@ -888,7 +887,7 @@ static int zfcp_erp_port_strategy_open_common(struct zfcp_erp_action *act) | |||
888 | case ZFCP_ERP_STEP_PORT_OPENING: | 887 | case ZFCP_ERP_STEP_PORT_OPENING: |
889 | /* D_ID might have changed during open */ | 888 | /* D_ID might have changed during open */ |
890 | if (p_status & ZFCP_STATUS_COMMON_OPEN) { | 889 | if (p_status & ZFCP_STATUS_COMMON_OPEN) { |
891 | if (p_status & ZFCP_STATUS_PORT_DID_DID) | 890 | if (port->d_id) |
892 | return ZFCP_ERP_SUCCEEDED; | 891 | return ZFCP_ERP_SUCCEEDED; |
893 | else { | 892 | else { |
894 | act->step = ZFCP_ERP_STEP_PORT_CLOSING; | 893 | act->step = ZFCP_ERP_STEP_PORT_CLOSING; |