X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fs390%2Fscsi%2Fzfcp_def.h;h=53fcccbb424c8c324170d8d5ec9cd90be0f8eb03;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=22f69d6bf172d26800c1f1158b302c744668cd37;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index 22f69d6bf..53fcccbb4 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h @@ -12,6 +12,8 @@ * Wolfgang Taphorn * Stefan Bader * Heiko Carstens + * Andreas Herrmann + * Volker Sameske * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,8 +34,7 @@ #ifndef ZFCP_DEF_H #define ZFCP_DEF_H -/* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_DEF_REVISION "$Revision: 1.91 $" +#define ZFCP_DEF_REVISION "$Revision: 1.111 $" /*************************** INCLUDES *****************************************/ @@ -60,9 +61,7 @@ #include #include #include -#ifdef CONFIG_S390_SUPPORT #include -#endif /************************ DEBUG FLAGS *****************************************/ @@ -71,7 +70,7 @@ /********************* GENERAL DEFINES *********************************/ /* zfcp version number, it consists of major, minor, and patch-level number */ -#define ZFCP_VERSION "4.1.3" +#define ZFCP_VERSION "4.2.0" /** * zfcp_sg_to_address - determine kernel address from struct scatterlist @@ -187,11 +186,11 @@ typedef unsigned int fcp_dl_t; #define UNTAGGED 5 /* task management flags in FCP-2 FCP_CMND IU */ -#define CLEAR_ACA 0x40 -#define TARGET_RESET 0x20 -#define LOGICAL_UNIT_RESET 0x10 -#define CLEAR_TASK_SET 0x04 -#define ABORT_TASK_SET 0x02 +#define FCP_CLEAR_ACA 0x40 +#define FCP_TARGET_RESET 0x20 +#define FCP_LOGICAL_UNIT_RESET 0x10 +#define FCP_CLEAR_TASK_SET 0x04 +#define FCP_ABORT_TASK_SET 0x02 #define FCP_CDB_LENGTH 16 @@ -289,11 +288,11 @@ struct fcp_logo { #define R_A_TOV 10 /* seconds */ #define ZFCP_ELS_TIMEOUT (2 * R_A_TOV) -#define ZFCP_LS_RTV 0x0E -#define ZFCP_LS_RLS 0x0F -#define ZFCP_LS_PDISC 0x50 +#define ZFCP_LS_RLS 0x0f #define ZFCP_LS_ADISC 0x52 -#define ZFCP_LS_RTV_E_D_TOV_FLAG 0x04000000 +#define ZFCP_LS_RPS 0x56 +#define ZFCP_LS_RSCN 0x61 +#define ZFCP_LS_RNID 0x78 struct zfcp_ls_rjt_par { u8 action; @@ -302,82 +301,22 @@ struct zfcp_ls_rjt_par { u8 vendor_unique; } __attribute__ ((packed)); -struct zfcp_ls_rtv { - u8 code; - u8 field[3]; -} __attribute__ ((packed)); - -struct zfcp_ls_rtv_acc { - u8 code; - u8 field[3]; - u32 r_a_tov; - u32 e_d_tov; - u32 qualifier; -} __attribute__ ((packed)); - -struct zfcp_ls_rls { - u8 code; - u8 field[3]; - fc_id_t port_id; -} __attribute__ ((packed)); - -struct zfcp_ls_rls_acc { - u8 code; - u8 field[3]; - u32 link_failure_count; - u32 loss_of_sync_count; - u32 loss_of_signal_count; - u32 prim_seq_prot_error; - u32 invalid_transmition_word; - u32 invalid_crc_count; -} __attribute__ ((packed)); - -struct zfcp_ls_pdisc { - u8 code; - u8 field[3]; - u8 common_svc_parm[16]; - wwn_t wwpn; - wwn_t wwnn; - struct { - u8 class1[16]; - u8 class2[16]; - u8 class3[16]; - } svc_parm; - u8 reserved[16]; - u8 vendor_version[16]; -} __attribute__ ((packed)); - -struct zfcp_ls_pdisc_acc { - u8 code; - u8 field[3]; - u8 common_svc_parm[16]; - wwn_t wwpn; - wwn_t wwnn; - struct { - u8 class1[16]; - u8 class2[16]; - u8 class3[16]; - } svc_parm; - u8 reserved[16]; - u8 vendor_version[16]; -} __attribute__ ((packed)); - struct zfcp_ls_adisc { u8 code; u8 field[3]; - fc_id_t hard_nport_id; - wwn_t wwpn; - wwn_t wwnn; - fc_id_t nport_id; + u32 hard_nport_id; + u64 wwpn; + u64 wwnn; + u32 nport_id; } __attribute__ ((packed)); struct zfcp_ls_adisc_acc { u8 code; u8 field[3]; - fc_id_t hard_nport_id; - wwn_t wwpn; - wwn_t wwnn; - fc_id_t nport_id; + u32 hard_nport_id; + u64 wwpn; + u64 wwnn; + u32 nport_id; } __attribute__ ((packed)); struct zfcp_rc_entry { @@ -440,6 +379,9 @@ struct zfcp_rc_entry { #define ZFCP_NAME "zfcp" +/* read-only LUN sharing switch initial value */ +#define ZFCP_RO_LUN_SHARING_DEFAULTS 0 + /* independent log areas */ #define ZFCP_LOG_AREA_OTHER 0 #define ZFCP_LOG_AREA_SCSI 1 @@ -489,7 +431,7 @@ struct zfcp_rc_entry { /* logging routine for zfcp */ #define _ZFCP_LOG(fmt, args...) \ printk(KERN_ERR ZFCP_NAME": %s(%d): " fmt, __FUNCTION__, \ - __LINE__ , ##args); + __LINE__ , ##args) #define ZFCP_LOG(level, fmt, args...) \ do { \ @@ -548,8 +490,8 @@ do { \ * Note, the leftmost status byte is common among adapter, port * and unit */ -#define ZFCP_COMMON_FLAGS 0xff000000 -#define ZFCP_SPECIFIC_FLAGS 0x00ffffff +#define ZFCP_COMMON_FLAGS 0xfff00000 +#define ZFCP_SPECIFIC_FLAGS 0x000fffff /* common status bits */ #define ZFCP_STATUS_COMMON_REMOVE 0x80000000 @@ -560,6 +502,7 @@ do { \ #define ZFCP_STATUS_COMMON_OPEN 0x04000000 #define ZFCP_STATUS_COMMON_CLOSING 0x02000000 #define ZFCP_STATUS_COMMON_ERP_INUSE 0x01000000 +#define ZFCP_STATUS_COMMON_ACCESS_DENIED 0x00800000 /* adapter status */ #define ZFCP_STATUS_ADAPTER_QDIOUP 0x00000002 @@ -590,6 +533,7 @@ do { \ #define ZFCP_STATUS_PORT_NO_WWPN 0x00000008 #define ZFCP_STATUS_PORT_NO_SCSI_ID 0x00000010 #define ZFCP_STATUS_PORT_INVALID_WWPN 0x00000020 +#define ZFCP_STATUS_PORT_ACCESS_DENIED 0x00000040 /* for ports with well known addresses */ #define ZFCP_STATUS_PORT_WKA \ @@ -598,7 +542,9 @@ do { \ /* logical unit status */ #define ZFCP_STATUS_UNIT_NOTSUPPUNITRESET 0x00000001 - +#define ZFCP_STATUS_UNIT_TEMPORARY 0x00000002 +#define ZFCP_STATUS_UNIT_SHARED 0x00000004 +#define ZFCP_STATUS_UNIT_READONLY 0x00000008 /* FSF request status (this does not have a common part) */ #define ZFCP_STATUS_FSFREQ_NOT_INIT 0x00000000 @@ -817,7 +763,8 @@ typedef void (*zfcp_send_els_handler_t)(unsigned long); /** * struct zfcp_send_els - used to pass parameters to function zfcp_fsf_send_els - * @port: port where the request is sent to + * @adapter: adapter where request is sent from + * @d_id: destiniation id of port where request is sent to * @req: scatter-gather list for request * @resp: scatter-gather list for response * @req_count: number of elements in request scatter-gather list @@ -830,7 +777,8 @@ typedef void (*zfcp_send_els_handler_t)(unsigned long); * @status: used to pass error status to calling function */ struct zfcp_send_els { - struct zfcp_port *port; + struct zfcp_adapter *adapter; + fc_id_t d_id; struct scatterlist *req; struct scatterlist *resp; unsigned int req_count; @@ -952,7 +900,7 @@ struct zfcp_adapter { debug_info_t *abort_dbf; debug_info_t *in_els_dbf; debug_info_t *cmd_dbf; - rwlock_t cmd_dbf_lock; + spinlock_t dbf_lock; struct zfcp_adapter_mempool pool; /* Adapter memory pools */ struct qdio_initialize qdio_init_data; /* for qdio_establish */ struct device generic_services; /* directory for WKA ports */ @@ -1002,8 +950,6 @@ struct zfcp_unit { struct scsi_device *device; /* scsi device struct pointer */ struct zfcp_erp_action erp_action; /* pending error recovery */ atomic_t erp_counter; - atomic_t scsi_add_work; /* used to synchronize */ - wait_queue_head_t scsi_add_wq; /* wait for scsi_add_device */ }; /* FSF request */ @@ -1055,6 +1001,7 @@ struct zfcp_data { char init_busid[BUS_ID_SIZE]; wwn_t init_wwpn; fcp_lun_t init_fcp_lun; + char *driver_version; }; /**