aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_erp.c
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2008-10-01 06:42:16 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-03 13:11:52 -0400
commit44cc76f2d154aa24340354b4711a0fe7f8f08adc (patch)
tree0b32bb89450b12262b4bf78fc4cd297e8db0b77b /drivers/s390/scsi/zfcp_erp.c
parentff3b24fa5370a7ca618f212284d9b36fcedb9c0e (diff)
[SCSI] zfcp: remove unused references, declarations and flags
- Remove unused references and declarations, including one instance of the FC ls_adisc struct that has been defined twice. - Also remove the flags COMMON_OPENING, COMMON_CLOSING, ADAPTER_REGISTERED and XPORT_OK that are only set and cleared, but not checked anywhere. - Remove the zfcp specific atomic_test_mask makro. Simply use atomic_read directly instead. - Remove the zfcp internal sg helper functions and switch the places where it is still used to call sg_virt directly. - With the update of the QDIO code, the QDIO data structures no longer use the volatile type qualifier. Now we can also remove the volatile qualifiers from the zfcp code. Signed-off-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/scsi/zfcp_erp.c')
-rw-r--r--drivers/s390/scsi/zfcp_erp.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index 4dd8fe70c415..b18c6dd37294 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -669,8 +669,6 @@ static int zfcp_erp_adapter_strategy_open_fsf_xport(struct zfcp_erp_action *act)
669 int ret; 669 int ret;
670 struct zfcp_adapter *adapter = act->adapter; 670 struct zfcp_adapter *adapter = act->adapter;
671 671
672 atomic_clear_mask(ZFCP_STATUS_ADAPTER_XPORT_OK, &adapter->status);
673
674 write_lock_irq(&adapter->erp_lock); 672 write_lock_irq(&adapter->erp_lock);
675 zfcp_erp_action_to_running(act); 673 zfcp_erp_action_to_running(act);
676 write_unlock_irq(&adapter->erp_lock); 674 write_unlock_irq(&adapter->erp_lock);
@@ -741,8 +739,7 @@ static int zfcp_erp_adapter_strategy_generic(struct zfcp_erp_action *act,
741 ZFCP_STATUS_COMMON_OPEN, ZFCP_CLEAR); 739 ZFCP_STATUS_COMMON_OPEN, ZFCP_CLEAR);
742 failed_qdio: 740 failed_qdio:
743 atomic_clear_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK | 741 atomic_clear_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK |
744 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED | 742 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED,
745 ZFCP_STATUS_ADAPTER_XPORT_OK,
746 &act->adapter->status); 743 &act->adapter->status);
747 return retval; 744 return retval;
748} 745}
@@ -751,15 +748,11 @@ static int zfcp_erp_adapter_strategy(struct zfcp_erp_action *act)
751{ 748{
752 int retval; 749 int retval;
753 750
754 atomic_set_mask(ZFCP_STATUS_COMMON_CLOSING, &act->adapter->status);
755 zfcp_erp_adapter_strategy_generic(act, 1); /* close */ 751 zfcp_erp_adapter_strategy_generic(act, 1); /* close */
756 atomic_clear_mask(ZFCP_STATUS_COMMON_CLOSING, &act->adapter->status);
757 if (act->status & ZFCP_STATUS_ERP_CLOSE_ONLY) 752 if (act->status & ZFCP_STATUS_ERP_CLOSE_ONLY)
758 return ZFCP_ERP_EXIT; 753 return ZFCP_ERP_EXIT;
759 754
760 atomic_set_mask(ZFCP_STATUS_COMMON_OPENING, &act->adapter->status);
761 retval = zfcp_erp_adapter_strategy_generic(act, 0); /* open */ 755 retval = zfcp_erp_adapter_strategy_generic(act, 0); /* open */
762 atomic_clear_mask(ZFCP_STATUS_COMMON_OPENING, &act->adapter->status);
763 756
764 if (retval == ZFCP_ERP_FAILED) 757 if (retval == ZFCP_ERP_FAILED)
765 ssleep(8); 758 ssleep(8);
@@ -783,9 +776,7 @@ static int zfcp_erp_port_forced_strategy_close(struct zfcp_erp_action *act)
783 776
784static void zfcp_erp_port_strategy_clearstati(struct zfcp_port *port) 777static void zfcp_erp_port_strategy_clearstati(struct zfcp_port *port)
785{ 778{
786 atomic_clear_mask(ZFCP_STATUS_COMMON_OPENING | 779 atomic_clear_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED |
787 ZFCP_STATUS_COMMON_CLOSING |
788 ZFCP_STATUS_COMMON_ACCESS_DENIED |
789 ZFCP_STATUS_PORT_DID_DID | 780 ZFCP_STATUS_PORT_DID_DID |
790 ZFCP_STATUS_PORT_PHYS_CLOSING | 781 ZFCP_STATUS_PORT_PHYS_CLOSING |
791 ZFCP_STATUS_PORT_INVALID_WWPN, 782 ZFCP_STATUS_PORT_INVALID_WWPN,
@@ -998,9 +989,7 @@ static int zfcp_erp_port_strategy(struct zfcp_erp_action *erp_action)
998 989
999static void zfcp_erp_unit_strategy_clearstati(struct zfcp_unit *unit) 990static void zfcp_erp_unit_strategy_clearstati(struct zfcp_unit *unit)
1000{ 991{
1001 atomic_clear_mask(ZFCP_STATUS_COMMON_OPENING | 992 atomic_clear_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED |
1002 ZFCP_STATUS_COMMON_CLOSING |
1003 ZFCP_STATUS_COMMON_ACCESS_DENIED |
1004 ZFCP_STATUS_UNIT_SHARED | 993 ZFCP_STATUS_UNIT_SHARED |
1005 ZFCP_STATUS_UNIT_READONLY, 994 ZFCP_STATUS_UNIT_READONLY,
1006 &unit->status); 995 &unit->status);