aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_def.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/scsi/zfcp_def.h')
-rw-r--r--drivers/s390/scsi/zfcp_def.h68
1 files changed, 12 insertions, 56 deletions
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
index 6eba56cd89ba..2df512a18e2c 100644
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -1,19 +1,8 @@
1/* 1/*
2 * 2 * This file is part of the zfcp device driver for
3 * linux/drivers/s390/scsi/zfcp_def.h 3 * FCP adapters for IBM System z9 and zSeries.
4 *
5 * FCP adapter driver for IBM eServer zSeries
6 *
7 * (C) Copyright IBM Corp. 2002, 2004
8 * 4 *
9 * Author(s): Martin Peschke <mpeschke@de.ibm.com> 5 * (C) Copyright IBM Corp. 2002, 2006
10 * Raimund Schroeder <raimund.schroeder@de.ibm.com>
11 * Aron Zeh
12 * Wolfgang Taphorn
13 * Stefan Bader <stefan.bader@de.ibm.com>
14 * Heiko Carstens <heiko.carstens@de.ibm.com>
15 * Andreas Herrmann <aherrman@de.ibm.com>
16 * Volker Sameske <sameske@de.ibm.com>
17 * 6 *
18 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -50,7 +39,6 @@
50#include <scsi/scsi_host.h> 39#include <scsi/scsi_host.h>
51#include <scsi/scsi_transport.h> 40#include <scsi/scsi_transport.h>
52#include <scsi/scsi_transport_fc.h> 41#include <scsi/scsi_transport_fc.h>
53#include "../../fc4/fc.h"
54#include "zfcp_fsf.h" 42#include "zfcp_fsf.h"
55#include <asm/ccwdev.h> 43#include <asm/ccwdev.h>
56#include <asm/qdio.h> 44#include <asm/qdio.h>
@@ -64,7 +52,7 @@
64/********************* GENERAL DEFINES *********************************/ 52/********************* GENERAL DEFINES *********************************/
65 53
66/* zfcp version number, it consists of major, minor, and patch-level number */ 54/* zfcp version number, it consists of major, minor, and patch-level number */
67#define ZFCP_VERSION "4.5.0" 55#define ZFCP_VERSION "4.7.0"
68 56
69/** 57/**
70 * zfcp_sg_to_address - determine kernel address from struct scatterlist 58 * zfcp_sg_to_address - determine kernel address from struct scatterlist
@@ -89,13 +77,9 @@ zfcp_address_to_sg(void *address, struct scatterlist *list)
89 list->offset = ((unsigned long) address) & (PAGE_SIZE - 1); 77 list->offset = ((unsigned long) address) & (PAGE_SIZE - 1);
90} 78}
91 79
92/********************* SCSI SPECIFIC DEFINES *********************************/ 80#define REQUEST_LIST_SIZE 128
93 81
94/* 32 bit for SCSI ID and LUN as long as the SCSI stack uses this type */ 82/********************* SCSI SPECIFIC DEFINES *********************************/
95typedef u32 scsi_id_t;
96typedef u32 scsi_lun_t;
97
98#define ZFCP_ERP_SCSI_LOW_MEM_TIMEOUT (100*HZ)
99#define ZFCP_SCSI_ER_TIMEOUT (100*HZ) 83#define ZFCP_SCSI_ER_TIMEOUT (100*HZ)
100 84
101/********************* CIO/QDIO SPECIFIC DEFINES *****************************/ 85/********************* CIO/QDIO SPECIFIC DEFINES *****************************/
@@ -233,8 +217,9 @@ struct fcp_rsp_iu {
233#define RSP_CODE_TASKMAN_FAILED 5 217#define RSP_CODE_TASKMAN_FAILED 5
234 218
235/* see fc-fs */ 219/* see fc-fs */
236#define LS_FAN 0x60000000 220#define LS_RSCN 0x61040000
237#define LS_RSCN 0x61040000 221#define LS_LOGO 0x05000000
222#define LS_PLOGI 0x03000000
238 223
239struct fcp_rscn_head { 224struct fcp_rscn_head {
240 u8 command; 225 u8 command;
@@ -263,13 +248,6 @@ struct fcp_rscn_element {
263#define ZFCP_NO_PORTS_PER_DOMAIN 0x10000 248#define ZFCP_NO_PORTS_PER_DOMAIN 0x10000
264#define ZFCP_NO_PORTS_PER_FABRIC 0x1000000 249#define ZFCP_NO_PORTS_PER_FABRIC 0x1000000
265 250
266struct fcp_fan {
267 u32 command;
268 u32 fport_did;
269 wwn_t fport_wwpn;
270 wwn_t fport_wwname;
271} __attribute__((packed));
272
273/* see fc-ph */ 251/* see fc-ph */
274struct fcp_logo { 252struct fcp_logo {
275 u32 command; 253 u32 command;
@@ -507,9 +485,6 @@ struct zfcp_rc_entry {
507 485
508#define ZFCP_NAME "zfcp" 486#define ZFCP_NAME "zfcp"
509 487
510/* read-only LUN sharing switch initial value */
511#define ZFCP_RO_LUN_SHARING_DEFAULTS 0
512
513/* independent log areas */ 488/* independent log areas */
514#define ZFCP_LOG_AREA_OTHER 0 489#define ZFCP_LOG_AREA_OTHER 0
515#define ZFCP_LOG_AREA_SCSI 1 490#define ZFCP_LOG_AREA_SCSI 1
@@ -608,7 +583,6 @@ do { \
608 * and unit 583 * and unit
609 */ 584 */
610#define ZFCP_COMMON_FLAGS 0xfff00000 585#define ZFCP_COMMON_FLAGS 0xfff00000
611#define ZFCP_SPECIFIC_FLAGS 0x000fffff
612 586
613/* common status bits */ 587/* common status bits */
614#define ZFCP_STATUS_COMMON_REMOVE 0x80000000 588#define ZFCP_STATUS_COMMON_REMOVE 0x80000000
@@ -633,11 +607,6 @@ do { \
633#define ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED 0x00000200 607#define ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED 0x00000200
634#define ZFCP_STATUS_ADAPTER_XPORT_OK 0x00000800 608#define ZFCP_STATUS_ADAPTER_XPORT_OK 0x00000800
635 609
636#define ZFCP_STATUS_ADAPTER_SCSI_UP \
637 (ZFCP_STATUS_COMMON_UNBLOCKED | \
638 ZFCP_STATUS_ADAPTER_REGISTERED)
639
640
641/* FC-PH/FC-GS well-known address identifiers for generic services */ 610/* FC-PH/FC-GS well-known address identifiers for generic services */
642#define ZFCP_DID_MANAGEMENT_SERVICE 0xFFFFFA 611#define ZFCP_DID_MANAGEMENT_SERVICE 0xFFFFFA
643#define ZFCP_DID_TIME_SERVICE 0xFFFFFB 612#define ZFCP_DID_TIME_SERVICE 0xFFFFFB
@@ -652,7 +621,6 @@ do { \
652#define ZFCP_STATUS_PORT_NO_WWPN 0x00000008 621#define ZFCP_STATUS_PORT_NO_WWPN 0x00000008
653#define ZFCP_STATUS_PORT_NO_SCSI_ID 0x00000010 622#define ZFCP_STATUS_PORT_NO_SCSI_ID 0x00000010
654#define ZFCP_STATUS_PORT_INVALID_WWPN 0x00000020 623#define ZFCP_STATUS_PORT_INVALID_WWPN 0x00000020
655#define ZFCP_STATUS_PORT_ACCESS_DENIED 0x00000040
656 624
657/* for ports with well known addresses */ 625/* for ports with well known addresses */
658#define ZFCP_STATUS_PORT_WKA \ 626#define ZFCP_STATUS_PORT_WKA \
@@ -908,15 +876,12 @@ struct zfcp_adapter {
908 wwn_t peer_wwpn; /* P2P peer WWPN */ 876 wwn_t peer_wwpn; /* P2P peer WWPN */
909 u32 peer_d_id; /* P2P peer D_ID */ 877 u32 peer_d_id; /* P2P peer D_ID */
910 struct ccw_device *ccw_device; /* S/390 ccw device */ 878 struct ccw_device *ccw_device; /* S/390 ccw device */
911 u8 fc_service_class;
912 u32 hydra_version; /* Hydra version */ 879 u32 hydra_version; /* Hydra version */
913 u32 fsf_lic_version; 880 u32 fsf_lic_version;
914 u32 adapter_features; /* FCP channel features */ 881 u32 adapter_features; /* FCP channel features */
915 u32 connection_features; /* host connection features */ 882 u32 connection_features; /* host connection features */
916 u32 hardware_version; /* of FCP channel */ 883 u32 hardware_version; /* of FCP channel */
917 struct Scsi_Host *scsi_host; /* Pointer to mid-layer */ 884 struct Scsi_Host *scsi_host; /* Pointer to mid-layer */
918 unsigned short scsi_host_no; /* Assigned host number */
919 unsigned char name[9];
920 struct list_head port_list_head; /* remote port list */ 885 struct list_head port_list_head; /* remote port list */
921 struct list_head port_remove_lh; /* head of ports to be 886 struct list_head port_remove_lh; /* head of ports to be
922 removed */ 887 removed */
@@ -994,6 +959,8 @@ struct zfcp_port {
994 u32 handle; /* handle assigned by FSF */ 959 u32 handle; /* handle assigned by FSF */
995 struct zfcp_erp_action erp_action; /* pending error recovery */ 960 struct zfcp_erp_action erp_action; /* pending error recovery */
996 atomic_t erp_counter; 961 atomic_t erp_counter;
962 u32 maxframe_size;
963 u32 supported_classes;
997}; 964};
998 965
999/* the struct device sysfs_device must be at the beginning of this structure. 966/* the struct device sysfs_device must be at the beginning of this structure.
@@ -1008,7 +975,7 @@ struct zfcp_unit {
1008 refcount drop to zero */ 975 refcount drop to zero */
1009 struct zfcp_port *port; /* remote port of unit */ 976 struct zfcp_port *port; /* remote port of unit */
1010 atomic_t status; /* status of this logical unit */ 977 atomic_t status; /* status of this logical unit */
1011 scsi_lun_t scsi_lun; /* own SCSI LUN */ 978 unsigned int scsi_lun; /* own SCSI LUN */
1012 fcp_lun_t fcp_lun; /* own FCP_LUN */ 979 fcp_lun_t fcp_lun; /* own FCP_LUN */
1013 u32 handle; /* handle assigned by FSF */ 980 u32 handle; /* handle assigned by FSF */
1014 struct scsi_device *device; /* scsi device struct pointer */ 981 struct scsi_device *device; /* scsi device struct pointer */
@@ -1052,11 +1019,6 @@ struct zfcp_data {
1052 struct list_head adapter_list_head; /* head of adapter list */ 1019 struct list_head adapter_list_head; /* head of adapter list */
1053 struct list_head adapter_remove_lh; /* head of adapters to be 1020 struct list_head adapter_remove_lh; /* head of adapters to be
1054 removed */ 1021 removed */
1055 rwlock_t status_read_lock; /* for status read thread */
1056 struct list_head status_read_receive_head;
1057 struct list_head status_read_send_head;
1058 struct semaphore status_read_sema;
1059 wait_queue_head_t status_read_thread_wqh;
1060 u32 adapters; /* # of adapters in list */ 1022 u32 adapters; /* # of adapters in list */
1061 rwlock_t config_lock; /* serialises changes 1023 rwlock_t config_lock; /* serialises changes
1062 to adapter/port/unit 1024 to adapter/port/unit
@@ -1095,9 +1057,6 @@ struct zfcp_fsf_req_pool_element {
1095 1057
1096/********************** ZFCP SPECIFIC DEFINES ********************************/ 1058/********************** ZFCP SPECIFIC DEFINES ********************************/
1097 1059
1098#define ZFCP_FSFREQ_CLEANUP_TIMEOUT HZ/10
1099
1100#define ZFCP_KNOWN 0x00000001
1101#define ZFCP_REQ_AUTO_CLEANUP 0x00000002 1060#define ZFCP_REQ_AUTO_CLEANUP 0x00000002
1102#define ZFCP_WAIT_FOR_SBAL 0x00000004 1061#define ZFCP_WAIT_FOR_SBAL 0x00000004
1103#define ZFCP_REQ_NO_QTCB 0x00000008 1062#define ZFCP_REQ_NO_QTCB 0x00000008
@@ -1105,9 +1064,6 @@ struct zfcp_fsf_req_pool_element {
1105#define ZFCP_SET 0x00000100 1064#define ZFCP_SET 0x00000100
1106#define ZFCP_CLEAR 0x00000200 1065#define ZFCP_CLEAR 0x00000200
1107 1066
1108#define ZFCP_INTERRUPTIBLE 1
1109#define ZFCP_UNINTERRUPTIBLE 0
1110
1111#ifndef atomic_test_mask 1067#ifndef atomic_test_mask
1112#define atomic_test_mask(mask, target) \ 1068#define atomic_test_mask(mask, target) \
1113 ((atomic_read(target) & mask) == mask) 1069 ((atomic_read(target) & mask) == mask)