aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Herrmann <aherrman@de.ibm.com>2006-05-22 12:18:19 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-05-28 12:43:33 -0400
commit06506d00ec1a0d7d3b1dff59185af355ce29ac0a (patch)
treefef406818d1bccd745913ece2df0dbcee16ec74a
parentec4081c6ba4fba6a8bc12a0e93db8817ba63ce47 (diff)
[SCSI] zfcp: (cleanup) removed superfluous macros, struct members, typedefs
Removed some macros, struct members and typedefs which were unused or not necessary. Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r--drivers/s390/scsi/zfcp_aux.c15
-rw-r--r--drivers/s390/scsi/zfcp_def.h47
-rw-r--r--drivers/s390/scsi/zfcp_erp.c2
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c62
-rw-r--r--drivers/s390/scsi/zfcp_fsf.h21
-rw-r--r--drivers/s390/scsi/zfcp_qdio.c3
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c13
7 files changed, 41 insertions, 122 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index 4a17ce499808..bdaad5535e22 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -740,7 +740,7 @@ struct zfcp_unit *
740zfcp_unit_enqueue(struct zfcp_port *port, fcp_lun_t fcp_lun) 740zfcp_unit_enqueue(struct zfcp_port *port, fcp_lun_t fcp_lun)
741{ 741{
742 struct zfcp_unit *unit, *tmp_unit; 742 struct zfcp_unit *unit, *tmp_unit;
743 scsi_lun_t scsi_lun; 743 unsigned int scsi_lun;
744 int found; 744 int found;
745 745
746 /* 746 /*
@@ -991,12 +991,6 @@ zfcp_adapter_enqueue(struct ccw_device *ccw_device)
991 /* intitialise SCSI ER timer */ 991 /* intitialise SCSI ER timer */
992 init_timer(&adapter->scsi_er_timer); 992 init_timer(&adapter->scsi_er_timer);
993 993
994 /* set FC service class used per default */
995 adapter->fc_service_class = ZFCP_FC_SERVICE_CLASS_DEFAULT;
996
997 sprintf(adapter->name, "%s", zfcp_get_busid_by_adapter(adapter));
998 ASCEBC(adapter->name, strlen(adapter->name));
999
1000 /* mark adapter unusable as long as sysfs registration is not complete */ 994 /* mark adapter unusable as long as sysfs registration is not complete */
1001 atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &adapter->status); 995 atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &adapter->status);
1002 996
@@ -1347,18 +1341,19 @@ static void
1347zfcp_fsf_incoming_els_plogi(struct zfcp_adapter *adapter, 1341zfcp_fsf_incoming_els_plogi(struct zfcp_adapter *adapter,
1348 struct fsf_status_read_buffer *status_buffer) 1342 struct fsf_status_read_buffer *status_buffer)
1349{ 1343{
1350 logi *els_logi = (logi *) status_buffer->payload; 1344 struct fsf_plogi *els_plogi;
1351 struct zfcp_port *port; 1345 struct zfcp_port *port;
1352 unsigned long flags; 1346 unsigned long flags;
1353 1347
1348 els_plogi = (struct fsf_plogi *) status_buffer->payload;
1354 read_lock_irqsave(&zfcp_data.config_lock, flags); 1349 read_lock_irqsave(&zfcp_data.config_lock, flags);
1355 list_for_each_entry(port, &adapter->port_list_head, list) { 1350 list_for_each_entry(port, &adapter->port_list_head, list) {
1356 if (port->wwpn == (*(wwn_t *) & els_logi->nport_wwn)) 1351 if (port->wwpn == (*(wwn_t *) &els_plogi->serv_param.wwpn))
1357 break; 1352 break;
1358 } 1353 }
1359 read_unlock_irqrestore(&zfcp_data.config_lock, flags); 1354 read_unlock_irqrestore(&zfcp_data.config_lock, flags);
1360 1355
1361 if (!port || (port->wwpn != (*(wwn_t *) & els_logi->nport_wwn))) { 1356 if (!port || (port->wwpn != (*(wwn_t *) &els_plogi->serv_param.wwpn))) {
1362 ZFCP_LOG_DEBUG("ignored incoming PLOGI for nonexisting port " 1357 ZFCP_LOG_DEBUG("ignored incoming PLOGI for nonexisting port "
1363 "with d_id 0x%08x on adapter %s\n", 1358 "with d_id 0x%08x on adapter %s\n",
1364 status_buffer->d_id, 1359 status_buffer->d_id,
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
index 362af4d95352..e93272f18827 100644
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -39,7 +39,6 @@
39#include <scsi/scsi_host.h> 39#include <scsi/scsi_host.h>
40#include <scsi/scsi_transport.h> 40#include <scsi/scsi_transport.h>
41#include <scsi/scsi_transport_fc.h> 41#include <scsi/scsi_transport_fc.h>
42#include "../../fc4/fc.h"
43#include "zfcp_fsf.h" 42#include "zfcp_fsf.h"
44#include <asm/ccwdev.h> 43#include <asm/ccwdev.h>
45#include <asm/qdio.h> 44#include <asm/qdio.h>
@@ -78,13 +77,9 @@ zfcp_address_to_sg(void *address, struct scatterlist *list)
78 list->offset = ((unsigned long) address) & (PAGE_SIZE - 1); 77 list->offset = ((unsigned long) address) & (PAGE_SIZE - 1);
79} 78}
80 79
81/********************* SCSI SPECIFIC DEFINES *********************************/ 80#define REQUEST_LIST_SIZE 128
82
83/* 32 bit for SCSI ID and LUN as long as the SCSI stack uses this type */
84typedef u32 scsi_id_t;
85typedef u32 scsi_lun_t;
86 81
87#define ZFCP_ERP_SCSI_LOW_MEM_TIMEOUT (100*HZ) 82/********************* SCSI SPECIFIC DEFINES *********************************/
88#define ZFCP_SCSI_ER_TIMEOUT (100*HZ) 83#define ZFCP_SCSI_ER_TIMEOUT (100*HZ)
89 84
90/********************* CIO/QDIO SPECIFIC DEFINES *****************************/ 85/********************* CIO/QDIO SPECIFIC DEFINES *****************************/
@@ -222,8 +217,9 @@ struct fcp_rsp_iu {
222#define RSP_CODE_TASKMAN_FAILED 5 217#define RSP_CODE_TASKMAN_FAILED 5
223 218
224/* see fc-fs */ 219/* see fc-fs */
225#define LS_FAN 0x60000000 220#define LS_RSCN 0x61040000
226#define LS_RSCN 0x61040000 221#define LS_LOGO 0x05000000
222#define LS_PLOGI 0x03000000
227 223
228struct fcp_rscn_head { 224struct fcp_rscn_head {
229 u8 command; 225 u8 command;
@@ -252,13 +248,6 @@ struct fcp_rscn_element {
252#define ZFCP_NO_PORTS_PER_DOMAIN 0x10000 248#define ZFCP_NO_PORTS_PER_DOMAIN 0x10000
253#define ZFCP_NO_PORTS_PER_FABRIC 0x1000000 249#define ZFCP_NO_PORTS_PER_FABRIC 0x1000000
254 250
255struct fcp_fan {
256 u32 command;
257 u32 fport_did;
258 wwn_t fport_wwpn;
259 wwn_t fport_wwname;
260} __attribute__((packed));
261
262/* see fc-ph */ 251/* see fc-ph */
263struct fcp_logo { 252struct fcp_logo {
264 u32 command; 253 u32 command;
@@ -496,9 +485,6 @@ struct zfcp_rc_entry {
496 485
497#define ZFCP_NAME "zfcp" 486#define ZFCP_NAME "zfcp"
498 487
499/* read-only LUN sharing switch initial value */
500#define ZFCP_RO_LUN_SHARING_DEFAULTS 0
501
502/* independent log areas */ 488/* independent log areas */
503#define ZFCP_LOG_AREA_OTHER 0 489#define ZFCP_LOG_AREA_OTHER 0
504#define ZFCP_LOG_AREA_SCSI 1 490#define ZFCP_LOG_AREA_SCSI 1
@@ -597,7 +583,6 @@ do { \
597 * and unit 583 * and unit
598 */ 584 */
599#define ZFCP_COMMON_FLAGS 0xfff00000 585#define ZFCP_COMMON_FLAGS 0xfff00000
600#define ZFCP_SPECIFIC_FLAGS 0x000fffff
601 586
602/* common status bits */ 587/* common status bits */
603#define ZFCP_STATUS_COMMON_REMOVE 0x80000000 588#define ZFCP_STATUS_COMMON_REMOVE 0x80000000
@@ -622,11 +607,6 @@ do { \
622#define ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED 0x00000200 607#define ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED 0x00000200
623#define ZFCP_STATUS_ADAPTER_XPORT_OK 0x00000800 608#define ZFCP_STATUS_ADAPTER_XPORT_OK 0x00000800
624 609
625#define ZFCP_STATUS_ADAPTER_SCSI_UP \
626 (ZFCP_STATUS_COMMON_UNBLOCKED | \
627 ZFCP_STATUS_ADAPTER_REGISTERED)
628
629
630/* FC-PH/FC-GS well-known address identifiers for generic services */ 610/* FC-PH/FC-GS well-known address identifiers for generic services */
631#define ZFCP_DID_MANAGEMENT_SERVICE 0xFFFFFA 611#define ZFCP_DID_MANAGEMENT_SERVICE 0xFFFFFA
632#define ZFCP_DID_TIME_SERVICE 0xFFFFFB 612#define ZFCP_DID_TIME_SERVICE 0xFFFFFB
@@ -641,7 +621,6 @@ do { \
641#define ZFCP_STATUS_PORT_NO_WWPN 0x00000008 621#define ZFCP_STATUS_PORT_NO_WWPN 0x00000008
642#define ZFCP_STATUS_PORT_NO_SCSI_ID 0x00000010 622#define ZFCP_STATUS_PORT_NO_SCSI_ID 0x00000010
643#define ZFCP_STATUS_PORT_INVALID_WWPN 0x00000020 623#define ZFCP_STATUS_PORT_INVALID_WWPN 0x00000020
644#define ZFCP_STATUS_PORT_ACCESS_DENIED 0x00000040
645 624
646/* for ports with well known addresses */ 625/* for ports with well known addresses */
647#define ZFCP_STATUS_PORT_WKA \ 626#define ZFCP_STATUS_PORT_WKA \
@@ -897,15 +876,12 @@ struct zfcp_adapter {
897 wwn_t peer_wwpn; /* P2P peer WWPN */ 876 wwn_t peer_wwpn; /* P2P peer WWPN */
898 u32 peer_d_id; /* P2P peer D_ID */ 877 u32 peer_d_id; /* P2P peer D_ID */
899 struct ccw_device *ccw_device; /* S/390 ccw device */ 878 struct ccw_device *ccw_device; /* S/390 ccw device */
900 u8 fc_service_class;
901 u32 hydra_version; /* Hydra version */ 879 u32 hydra_version; /* Hydra version */
902 u32 fsf_lic_version; 880 u32 fsf_lic_version;
903 u32 adapter_features; /* FCP channel features */ 881 u32 adapter_features; /* FCP channel features */
904 u32 connection_features; /* host connection features */ 882 u32 connection_features; /* host connection features */
905 u32 hardware_version; /* of FCP channel */ 883 u32 hardware_version; /* of FCP channel */
906 struct Scsi_Host *scsi_host; /* Pointer to mid-layer */ 884 struct Scsi_Host *scsi_host; /* Pointer to mid-layer */
907 unsigned short scsi_host_no; /* Assigned host number */
908 unsigned char name[9];
909 struct list_head port_list_head; /* remote port list */ 885 struct list_head port_list_head; /* remote port list */
910 struct list_head port_remove_lh; /* head of ports to be 886 struct list_head port_remove_lh; /* head of ports to be
911 removed */ 887 removed */
@@ -997,7 +973,7 @@ struct zfcp_unit {
997 refcount drop to zero */ 973 refcount drop to zero */
998 struct zfcp_port *port; /* remote port of unit */ 974 struct zfcp_port *port; /* remote port of unit */
999 atomic_t status; /* status of this logical unit */ 975 atomic_t status; /* status of this logical unit */
1000 scsi_lun_t scsi_lun; /* own SCSI LUN */ 976 unsigned int scsi_lun; /* own SCSI LUN */
1001 fcp_lun_t fcp_lun; /* own FCP_LUN */ 977 fcp_lun_t fcp_lun; /* own FCP_LUN */
1002 u32 handle; /* handle assigned by FSF */ 978 u32 handle; /* handle assigned by FSF */
1003 struct scsi_device *device; /* scsi device struct pointer */ 979 struct scsi_device *device; /* scsi device struct pointer */
@@ -1041,11 +1017,6 @@ struct zfcp_data {
1041 struct list_head adapter_list_head; /* head of adapter list */ 1017 struct list_head adapter_list_head; /* head of adapter list */
1042 struct list_head adapter_remove_lh; /* head of adapters to be 1018 struct list_head adapter_remove_lh; /* head of adapters to be
1043 removed */ 1019 removed */
1044 rwlock_t status_read_lock; /* for status read thread */
1045 struct list_head status_read_receive_head;
1046 struct list_head status_read_send_head;
1047 struct semaphore status_read_sema;
1048 wait_queue_head_t status_read_thread_wqh;
1049 u32 adapters; /* # of adapters in list */ 1020 u32 adapters; /* # of adapters in list */
1050 rwlock_t config_lock; /* serialises changes 1021 rwlock_t config_lock; /* serialises changes
1051 to adapter/port/unit 1022 to adapter/port/unit
@@ -1084,9 +1055,6 @@ struct zfcp_fsf_req_pool_element {
1084 1055
1085/********************** ZFCP SPECIFIC DEFINES ********************************/ 1056/********************** ZFCP SPECIFIC DEFINES ********************************/
1086 1057
1087#define ZFCP_FSFREQ_CLEANUP_TIMEOUT HZ/10
1088
1089#define ZFCP_KNOWN 0x00000001
1090#define ZFCP_REQ_AUTO_CLEANUP 0x00000002 1058#define ZFCP_REQ_AUTO_CLEANUP 0x00000002
1091#define ZFCP_WAIT_FOR_SBAL 0x00000004 1059#define ZFCP_WAIT_FOR_SBAL 0x00000004
1092#define ZFCP_REQ_NO_QTCB 0x00000008 1060#define ZFCP_REQ_NO_QTCB 0x00000008
@@ -1094,9 +1062,6 @@ struct zfcp_fsf_req_pool_element {
1094#define ZFCP_SET 0x00000100 1062#define ZFCP_SET 0x00000100
1095#define ZFCP_CLEAR 0x00000200 1063#define ZFCP_CLEAR 0x00000200
1096 1064
1097#define ZFCP_INTERRUPTIBLE 1
1098#define ZFCP_UNINTERRUPTIBLE 0
1099
1100#ifndef atomic_test_mask 1065#ifndef atomic_test_mask
1101#define atomic_test_mask(mask, target) \ 1066#define atomic_test_mask(mask, target) \
1102 ((atomic_read(target) & mask) == mask) 1067 ((atomic_read(target) & mask) == mask)
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index ea2e7a398892..ce852c0de129 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -3407,7 +3407,7 @@ zfcp_erp_adapter_access_changed(struct zfcp_adapter *adapter)
3407 return; 3407 return;
3408 3408
3409 debug_text_event(adapter->erp_dbf, 3, "a_access_recover"); 3409 debug_text_event(adapter->erp_dbf, 3, "a_access_recover");
3410 debug_event(adapter->erp_dbf, 3, &adapter->name, 8); 3410 debug_event(adapter->erp_dbf, 3, zfcp_get_busid_by_adapter(adapter), 8);
3411 3411
3412 read_lock_irqsave(&zfcp_data.config_lock, flags); 3412 read_lock_irqsave(&zfcp_data.config_lock, flags);
3413 if (adapter->nameserver_port) 3413 if (adapter->nameserver_port)
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index 4475e412066c..83b68e3043c8 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -1416,7 +1416,8 @@ zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool,
1416 1416
1417 /* settings in QTCB */ 1417 /* settings in QTCB */
1418 fsf_req->qtcb->header.port_handle = port->handle; 1418 fsf_req->qtcb->header.port_handle = port->handle;
1419 fsf_req->qtcb->bottom.support.service_class = adapter->fc_service_class; 1419 fsf_req->qtcb->bottom.support.service_class =
1420 ZFCP_FC_SERVICE_CLASS_DEFAULT;
1420 fsf_req->qtcb->bottom.support.timeout = ct->timeout; 1421 fsf_req->qtcb->bottom.support.timeout = ct->timeout;
1421 fsf_req->data = (unsigned long) ct; 1422 fsf_req->data = (unsigned long) ct;
1422 1423
@@ -1485,18 +1486,10 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1485 break; 1486 break;
1486 1487
1487 case FSF_SERVICE_CLASS_NOT_SUPPORTED: 1488 case FSF_SERVICE_CLASS_NOT_SUPPORTED:
1488 if (adapter->fc_service_class <= 3) { 1489 ZFCP_LOG_INFO("error: adapter %s does not support fc "
1489 ZFCP_LOG_INFO("error: adapter %s does not support fc " 1490 "class %d.\n",
1490 "class %d.\n", 1491 zfcp_get_busid_by_port(port),
1491 zfcp_get_busid_by_port(port), 1492 ZFCP_FC_SERVICE_CLASS_DEFAULT);
1492 adapter->fc_service_class);
1493 } else {
1494 ZFCP_LOG_INFO("bug: The fibre channel class at the "
1495 "adapter %s is invalid. "
1496 "(debug info %d)\n",
1497 zfcp_get_busid_by_port(port),
1498 adapter->fc_service_class);
1499 }
1500 /* stop operation for this adapter */ 1493 /* stop operation for this adapter */
1501 debug_text_exception(adapter->erp_dbf, 0, "fsf_s_class_nsup"); 1494 debug_text_exception(adapter->erp_dbf, 0, "fsf_s_class_nsup");
1502 zfcp_erp_adapter_shutdown(adapter, 0); 1495 zfcp_erp_adapter_shutdown(adapter, 0);
@@ -1719,7 +1712,8 @@ zfcp_fsf_send_els(struct zfcp_send_els *els)
1719 1712
1720 /* settings in QTCB */ 1713 /* settings in QTCB */
1721 fsf_req->qtcb->bottom.support.d_id = d_id; 1714 fsf_req->qtcb->bottom.support.d_id = d_id;
1722 fsf_req->qtcb->bottom.support.service_class = adapter->fc_service_class; 1715 fsf_req->qtcb->bottom.support.service_class =
1716 ZFCP_FC_SERVICE_CLASS_DEFAULT;
1723 fsf_req->qtcb->bottom.support.timeout = ZFCP_ELS_TIMEOUT; 1717 fsf_req->qtcb->bottom.support.timeout = ZFCP_ELS_TIMEOUT;
1724 fsf_req->data = (unsigned long) els; 1718 fsf_req->data = (unsigned long) els;
1725 1719
@@ -1789,18 +1783,10 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1789 break; 1783 break;
1790 1784
1791 case FSF_SERVICE_CLASS_NOT_SUPPORTED: 1785 case FSF_SERVICE_CLASS_NOT_SUPPORTED:
1792 if (adapter->fc_service_class <= 3) { 1786 ZFCP_LOG_INFO("error: adapter %s does not support fc "
1793 ZFCP_LOG_INFO("error: adapter %s does " 1787 "class %d.\n",
1794 "not support fibrechannel class %d.\n", 1788 zfcp_get_busid_by_adapter(adapter),
1795 zfcp_get_busid_by_adapter(adapter), 1789 ZFCP_FC_SERVICE_CLASS_DEFAULT);
1796 adapter->fc_service_class);
1797 } else {
1798 ZFCP_LOG_INFO("bug: The fibrechannel class at "
1799 "adapter %s is invalid. "
1800 "(debug info %d)\n",
1801 zfcp_get_busid_by_adapter(adapter),
1802 adapter->fc_service_class);
1803 }
1804 /* stop operation for this adapter */ 1790 /* stop operation for this adapter */
1805 debug_text_exception(adapter->erp_dbf, 0, "fsf_s_class_nsup"); 1791 debug_text_exception(adapter->erp_dbf, 0, "fsf_s_class_nsup");
1806 zfcp_erp_adapter_shutdown(adapter, 0); 1792 zfcp_erp_adapter_shutdown(adapter, 0);
@@ -2974,8 +2960,8 @@ zfcp_fsf_open_unit(struct zfcp_erp_action *erp_action)
2974 erp_action->fsf_req->qtcb->bottom.support.fcp_lun = 2960 erp_action->fsf_req->qtcb->bottom.support.fcp_lun =
2975 erp_action->unit->fcp_lun; 2961 erp_action->unit->fcp_lun;
2976 if (!(erp_action->adapter->connection_features & FSF_FEATURE_NPIV_MODE)) 2962 if (!(erp_action->adapter->connection_features & FSF_FEATURE_NPIV_MODE))
2977 erp_action->fsf_req->qtcb->bottom.support.option = 2963 erp_action->fsf_req->qtcb->bottom.support.option =
2978 FSF_OPEN_LUN_SUPPRESS_BOXING; 2964 FSF_OPEN_LUN_SUPPRESS_BOXING;
2979 atomic_set_mask(ZFCP_STATUS_COMMON_OPENING, &erp_action->unit->status); 2965 atomic_set_mask(ZFCP_STATUS_COMMON_OPENING, &erp_action->unit->status);
2980 erp_action->fsf_req->data = (unsigned long) erp_action->unit; 2966 erp_action->fsf_req->data = (unsigned long) erp_action->unit;
2981 erp_action->fsf_req->erp_action = erp_action; 2967 erp_action->fsf_req->erp_action = erp_action;
@@ -3550,7 +3536,7 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter,
3550 } 3536 }
3551 3537
3552 /* set FC service class in QTCB (3 per default) */ 3538 /* set FC service class in QTCB (3 per default) */
3553 fsf_req->qtcb->bottom.io.service_class = adapter->fc_service_class; 3539 fsf_req->qtcb->bottom.io.service_class = ZFCP_FC_SERVICE_CLASS_DEFAULT;
3554 3540
3555 /* set FCP_LUN in FCP_CMND IU in QTCB */ 3541 /* set FCP_LUN in FCP_CMND IU in QTCB */
3556 fcp_cmnd_iu->fcp_lun = unit->fcp_lun; 3542 fcp_cmnd_iu->fcp_lun = unit->fcp_lun;
@@ -3689,7 +3675,7 @@ zfcp_fsf_send_fcp_command_task_management(struct zfcp_adapter *adapter,
3689 fsf_req->qtcb->header.lun_handle = unit->handle; 3675 fsf_req->qtcb->header.lun_handle = unit->handle;
3690 fsf_req->qtcb->header.port_handle = unit->port->handle; 3676 fsf_req->qtcb->header.port_handle = unit->port->handle;
3691 fsf_req->qtcb->bottom.io.data_direction = FSF_DATADIR_CMND; 3677 fsf_req->qtcb->bottom.io.data_direction = FSF_DATADIR_CMND;
3692 fsf_req->qtcb->bottom.io.service_class = adapter->fc_service_class; 3678 fsf_req->qtcb->bottom.io.service_class = ZFCP_FC_SERVICE_CLASS_DEFAULT;
3693 fsf_req->qtcb->bottom.io.fcp_cmnd_length = 3679 fsf_req->qtcb->bottom.io.fcp_cmnd_length =
3694 sizeof (struct fcp_cmnd_iu) + sizeof (fcp_dl_t); 3680 sizeof (struct fcp_cmnd_iu) + sizeof (fcp_dl_t);
3695 3681
@@ -3812,18 +3798,10 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3812 break; 3798 break;
3813 3799
3814 case FSF_SERVICE_CLASS_NOT_SUPPORTED: 3800 case FSF_SERVICE_CLASS_NOT_SUPPORTED:
3815 if (fsf_req->adapter->fc_service_class <= 3) { 3801 ZFCP_LOG_INFO("error: adapter %s does not support fc "
3816 ZFCP_LOG_NORMAL("error: The adapter %s does " 3802 "class %d.\n",
3817 "not support fibrechannel class %d.\n", 3803 zfcp_get_busid_by_unit(unit),
3818 zfcp_get_busid_by_unit(unit), 3804 ZFCP_FC_SERVICE_CLASS_DEFAULT);
3819 fsf_req->adapter->fc_service_class);
3820 } else {
3821 ZFCP_LOG_NORMAL("bug: The fibrechannel class at "
3822 "adapter %s is invalid. "
3823 "(debug info %d)\n",
3824 zfcp_get_busid_by_unit(unit),
3825 fsf_req->adapter->fc_service_class);
3826 }
3827 /* stop operation for this adapter */ 3805 /* stop operation for this adapter */
3828 debug_text_exception(fsf_req->adapter->erp_dbf, 0, 3806 debug_text_exception(fsf_req->adapter->erp_dbf, 0,
3829 "fsf_s_class_nsup"); 3807 "fsf_s_class_nsup");
diff --git a/drivers/s390/scsi/zfcp_fsf.h b/drivers/s390/scsi/zfcp_fsf.h
index ca16dca30508..71186618947c 100644
--- a/drivers/s390/scsi/zfcp_fsf.h
+++ b/drivers/s390/scsi/zfcp_fsf.h
@@ -22,8 +22,7 @@
22#ifndef FSF_H 22#ifndef FSF_H
23#define FSF_H 23#define FSF_H
24 24
25#define FSF_QTCB_VERSION1 0x00000001 25#define FSF_QTCB_CURRENT_VERSION 0x00000001
26#define FSF_QTCB_CURRENT_VERSION FSF_QTCB_VERSION1
27 26
28/* FSF commands */ 27/* FSF commands */
29#define FSF_QTCB_FCP_CMND 0x00000001 28#define FSF_QTCB_FCP_CMND 0x00000001
@@ -53,7 +52,7 @@
53#define FSF_CFDC_OPTION_FULL_ACCESS 0x00000002 52#define FSF_CFDC_OPTION_FULL_ACCESS 0x00000002
54#define FSF_CFDC_OPTION_RESTRICTED_ACCESS 0x00000004 53#define FSF_CFDC_OPTION_RESTRICTED_ACCESS 0x00000004
55 54
56/* FSF protocol stati */ 55/* FSF protocol states */
57#define FSF_PROT_GOOD 0x00000001 56#define FSF_PROT_GOOD 0x00000001
58#define FSF_PROT_QTCB_VERSION_ERROR 0x00000010 57#define FSF_PROT_QTCB_VERSION_ERROR 0x00000010
59#define FSF_PROT_SEQ_NUMB_ERROR 0x00000020 58#define FSF_PROT_SEQ_NUMB_ERROR 0x00000020
@@ -65,7 +64,7 @@
65#define FSF_PROT_REEST_QUEUE 0x00000800 64#define FSF_PROT_REEST_QUEUE 0x00000800
66#define FSF_PROT_ERROR_STATE 0x01000000 65#define FSF_PROT_ERROR_STATE 0x01000000
67 66
68/* FSF stati */ 67/* FSF states */
69#define FSF_GOOD 0x00000000 68#define FSF_GOOD 0x00000000
70#define FSF_PORT_ALREADY_OPEN 0x00000001 69#define FSF_PORT_ALREADY_OPEN 0x00000001
71#define FSF_LUN_ALREADY_OPEN 0x00000002 70#define FSF_LUN_ALREADY_OPEN 0x00000002
@@ -258,20 +257,6 @@
258#define FSF_UNIT_ACCESS_EXCLUSIVE 0x02000000 257#define FSF_UNIT_ACCESS_EXCLUSIVE 0x02000000
259#define FSF_UNIT_ACCESS_OUTBOUND_TRANSFER 0x10000000 258#define FSF_UNIT_ACCESS_OUTBOUND_TRANSFER 0x10000000
260 259
261struct fsf_queue_designator;
262struct fsf_status_read_buffer;
263struct fsf_port_closed_payload;
264struct fsf_bit_error_payload;
265union fsf_prot_status_qual;
266struct fsf_qual_version_error;
267struct fsf_qual_sequence_error;
268struct fsf_qtcb_prefix;
269struct fsf_qtcb_header;
270struct fsf_qtcb_bottom_config;
271struct fsf_qtcb_bottom_support;
272struct fsf_qtcb_bottom_io;
273union fsf_qtcb_bottom;
274
275struct fsf_queue_designator { 260struct fsf_queue_designator {
276 u8 cssid; 261 u8 cssid;
277 u8 chpid; 262 u8 chpid;
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c
index dfb6644d17b8..345a191926a4 100644
--- a/drivers/s390/scsi/zfcp_qdio.c
+++ b/drivers/s390/scsi/zfcp_qdio.c
@@ -168,7 +168,8 @@ zfcp_qdio_allocate(struct zfcp_adapter *adapter)
168 168
169 init_data->cdev = adapter->ccw_device; 169 init_data->cdev = adapter->ccw_device;
170 init_data->q_format = QDIO_SCSI_QFMT; 170 init_data->q_format = QDIO_SCSI_QFMT;
171 memcpy(init_data->adapter_name, &adapter->name, 8); 171 memcpy(init_data->adapter_name, zfcp_get_busid_by_adapter(adapter), 8);
172 ASCEBC(init_data->adapter_name, 8);
172 init_data->qib_param_field_format = 0; 173 init_data->qib_param_field_format = 0;
173 init_data->qib_param_field = NULL; 174 init_data->qib_param_field = NULL;
174 init_data->input_slib_elements = NULL; 175 init_data->input_slib_elements = NULL;
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index 3a180d80c3cb..f198814196a4 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -35,8 +35,8 @@ static int zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *);
35static int zfcp_task_management_function(struct zfcp_unit *, u8, 35static int zfcp_task_management_function(struct zfcp_unit *, u8,
36 struct scsi_cmnd *); 36 struct scsi_cmnd *);
37 37
38static struct zfcp_unit *zfcp_unit_lookup(struct zfcp_adapter *, int, scsi_id_t, 38static struct zfcp_unit *zfcp_unit_lookup(struct zfcp_adapter *, int,
39 scsi_lun_t); 39 unsigned int, unsigned int);
40 40
41static struct device_attribute *zfcp_sysfs_sdev_attrs[]; 41static struct device_attribute *zfcp_sysfs_sdev_attrs[];
42 42
@@ -349,8 +349,8 @@ zfcp_scsi_queuecommand(struct scsi_cmnd *scpnt,
349} 349}
350 350
351static struct zfcp_unit * 351static struct zfcp_unit *
352zfcp_unit_lookup(struct zfcp_adapter *adapter, int channel, scsi_id_t id, 352zfcp_unit_lookup(struct zfcp_adapter *adapter, int channel, unsigned int id,
353 scsi_lun_t lun) 353 unsigned int lun)
354{ 354{
355 struct zfcp_port *port; 355 struct zfcp_port *port;
356 struct zfcp_unit *unit, *retval = NULL; 356 struct zfcp_unit *unit, *retval = NULL;
@@ -608,10 +608,6 @@ zfcp_adapter_scsi_register(struct zfcp_adapter *adapter)
608 adapter->scsi_host->unique_id = unique_id++; /* FIXME */ 608 adapter->scsi_host->unique_id = unique_id++; /* FIXME */
609 adapter->scsi_host->max_cmd_len = ZFCP_MAX_SCSI_CMND_LENGTH; 609 adapter->scsi_host->max_cmd_len = ZFCP_MAX_SCSI_CMND_LENGTH;
610 adapter->scsi_host->transportt = zfcp_transport_template; 610 adapter->scsi_host->transportt = zfcp_transport_template;
611 /*
612 * Reverse mapping of the host number to avoid race condition
613 */
614 adapter->scsi_host_no = adapter->scsi_host->host_no;
615 611
616 /* 612 /*
617 * save a pointer to our own adapter data structure within 613 * save a pointer to our own adapter data structure within
@@ -647,7 +643,6 @@ zfcp_adapter_scsi_unregister(struct zfcp_adapter *adapter)
647 scsi_remove_host(shost); 643 scsi_remove_host(shost);
648 scsi_host_put(shost); 644 scsi_host_put(shost);
649 adapter->scsi_host = NULL; 645 adapter->scsi_host = NULL;
650 adapter->scsi_host_no = 0;
651 atomic_clear_mask(ZFCP_STATUS_ADAPTER_REGISTERED, &adapter->status); 646 atomic_clear_mask(ZFCP_STATUS_ADAPTER_REGISTERED, &adapter->status);
652 647
653 return; 648 return;