]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/s390/scsi/zfcp_def.h
[S390] bus_id -> dev_name conversions
[linux-2.6-omap-h63xx.git] / drivers / s390 / scsi / zfcp_def.h
index d69d280359da5e92f372cbb15d7b015cf3bebb3d..c69345f1f73c7901b40dfe5af88245a579a0da13 100644 (file)
 
 /********************* GENERAL DEFINES *********************************/
 
-/**
- * zfcp_sg_to_address - determine kernel address from struct scatterlist
- * @list: struct scatterlist
- * Return: kernel address
- */
-static inline void *
-zfcp_sg_to_address(struct scatterlist *list)
-{
-       return sg_virt(list);
-}
-
-/**
- * zfcp_address_to_sg - set up struct scatterlist from kernel address
- * @address: kernel address
- * @list: struct scatterlist
- * @size: buffer size
- */
-static inline void
-zfcp_address_to_sg(void *address, struct scatterlist *list, unsigned int size)
-{
-       sg_set_buf(list, address, size);
-}
-
 #define REQUEST_LIST_SIZE 128
 
 /********************* SCSI SPECIFIC DEFINES *********************************/
@@ -76,11 +53,6 @@ zfcp_address_to_sg(void *address, struct scatterlist *list, unsigned int size)
 #define ZFCP_DEVICE_MODEL       0x03
 #define ZFCP_DEVICE_MODEL_PRIV 0x04
 
-/* allow as many chained SBALs as are supported by hardware */
-#define ZFCP_MAX_SBALS_PER_REQ         FSF_MAX_SBALS_PER_REQ
-#define ZFCP_MAX_SBALS_PER_CT_REQ      FSF_MAX_SBALS_PER_REQ
-#define ZFCP_MAX_SBALS_PER_ELS_REQ     FSF_MAX_SBALS_PER_ELS_REQ
-
 /* DMQ bug workaround: don't use last SBALE */
 #define ZFCP_MAX_SBALES_PER_SBAL       (QDIO_MAX_ELEMENTS_PER_BUFFER - 1)
 
@@ -89,40 +61,23 @@ zfcp_address_to_sg(void *address, struct scatterlist *list, unsigned int size)
 
 /* max. number of (data buffer) SBALEs in largest SBAL chain */
 #define ZFCP_MAX_SBALES_PER_REQ                \
-       (ZFCP_MAX_SBALS_PER_REQ * ZFCP_MAX_SBALES_PER_SBAL - 2)
+       (FSF_MAX_SBALS_PER_REQ * ZFCP_MAX_SBALES_PER_SBAL - 2)
         /* request ID + QTCB in SBALE 0 + 1 of first SBAL in chain */
 
 #define ZFCP_MAX_SECTORS (ZFCP_MAX_SBALES_PER_REQ * 8)
         /* max. number of (data buffer) SBALEs in largest SBAL chain
            multiplied with number of sectors per 4k block */
 
-#define ZFCP_SBAL_TIMEOUT               (5*HZ)
-
-#define ZFCP_TYPE2_RECOVERY_TIME        8      /* seconds */
-
 /********************* FSF SPECIFIC DEFINES *********************************/
 
-#define ZFCP_ULP_INFO_VERSION                   26
-#define ZFCP_QTCB_VERSION      FSF_QTCB_CURRENT_VERSION
 /* ATTENTION: value must not be used by hardware */
 #define FSF_QTCB_UNSOLICITED_STATUS            0x6305
 
-/* Do 1st retry in 1 second, then double the timeout for each following retry */
-#define ZFCP_EXCHANGE_CONFIG_DATA_FIRST_SLEEP  1
-#define ZFCP_EXCHANGE_CONFIG_DATA_RETRIES      7
-
 /* timeout value for "default timer" for fsf requests */
 #define ZFCP_FSF_REQUEST_TIMEOUT (60*HZ)
 
 /*************** FIBRE CHANNEL PROTOCOL SPECIFIC DEFINES ********************/
 
-typedef unsigned long long wwn_t;
-typedef unsigned long long fcp_lun_t;
-/* data length field may be at variable position in FCP-2 FCP_CMND IU */
-typedef unsigned int       fcp_dl_t;
-
-#define ZFCP_FC_SERVICE_CLASS_DEFAULT  FSF_CLASS_3
-
 /* timeout for name-server lookup (in seconds) */
 #define ZFCP_NS_GID_PN_TIMEOUT         10
 
@@ -146,7 +101,7 @@ typedef unsigned int       fcp_dl_t;
 
 /* FCP(-2) FCP_CMND IU */
 struct fcp_cmnd_iu {
-       fcp_lun_t fcp_lun;         /* FCP logical unit number */
+       u64 fcp_lun;       /* FCP logical unit number */
        u8  crn;                   /* command reference number */
        u8  reserved0:5;           /* reserved */
        u8  task_attribute:3;      /* task attribute */
@@ -221,14 +176,13 @@ struct fcp_rscn_element {
 struct fcp_logo {
         u32 command;
         u32 nport_did;
-        wwn_t nport_wwpn;
+       u64 nport_wwpn;
 } __attribute__((packed));
 
 /*
  * FC-FS stuff
  */
 #define R_A_TOV                                10 /* seconds */
-#define ZFCP_ELS_TIMEOUT               (2 * R_A_TOV)
 
 #define ZFCP_LS_RLS                    0x0f
 #define ZFCP_LS_ADISC                  0x52
@@ -236,13 +190,6 @@ struct fcp_logo {
 #define ZFCP_LS_RSCN                   0x61
 #define ZFCP_LS_RNID                   0x78
 
-struct zfcp_ls_rjt_par {
-       u8 action;
-       u8 reason_code;
-       u8 reason_expl;
-       u8 vendor_unique;
-} __attribute__ ((packed));
-
 struct zfcp_ls_adisc {
        u8              code;
        u8              field[3];
@@ -252,20 +199,6 @@ struct zfcp_ls_adisc {
        u32             nport_id;
 } __attribute__ ((packed));
 
-struct zfcp_ls_adisc_acc {
-       u8              code;
-       u8              field[3];
-       u32             hard_nport_id;
-       u64             wwpn;
-       u64             wwnn;
-       u32             nport_id;
-} __attribute__ ((packed));
-
-struct zfcp_rc_entry {
-       u8 code;
-       const char *description;
-};
-
 /*
  * FC-GS-2 stuff
  */
@@ -299,9 +232,7 @@ struct zfcp_rc_entry {
 #define ZFCP_STATUS_COMMON_RUNNING             0x40000000
 #define ZFCP_STATUS_COMMON_ERP_FAILED          0x20000000
 #define ZFCP_STATUS_COMMON_UNBLOCKED           0x10000000
-#define ZFCP_STATUS_COMMON_OPENING              0x08000000
 #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
 #define ZFCP_STATUS_COMMON_ACCESS_BOXED                0x00400000
@@ -309,16 +240,15 @@ struct zfcp_rc_entry {
 
 /* adapter status */
 #define ZFCP_STATUS_ADAPTER_QDIOUP             0x00000002
-#define ZFCP_STATUS_ADAPTER_REGISTERED         0x00000004
 #define ZFCP_STATUS_ADAPTER_XCONFIG_OK         0x00000008
 #define ZFCP_STATUS_ADAPTER_HOST_CON_INIT      0x00000010
 #define ZFCP_STATUS_ADAPTER_ERP_THREAD_UP      0x00000020
 #define ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL    0x00000080
 #define ZFCP_STATUS_ADAPTER_ERP_PENDING                0x00000100
 #define ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED     0x00000200
-#define ZFCP_STATUS_ADAPTER_XPORT_OK           0x00000800
 
 /* FC-PH/FC-GS well-known address identifiers for generic services */
+#define ZFCP_DID_WKA                           0xFFFFF0
 #define ZFCP_DID_MANAGEMENT_SERVICE            0xFFFFFA
 #define ZFCP_DID_TIME_SERVICE                  0xFFFFFB
 #define ZFCP_DID_DIRECTORY_SERVICE             0xFFFFFC
@@ -330,29 +260,27 @@ struct zfcp_rc_entry {
 #define ZFCP_STATUS_PORT_DID_DID               0x00000002
 #define ZFCP_STATUS_PORT_PHYS_CLOSING          0x00000004
 #define ZFCP_STATUS_PORT_NO_WWPN               0x00000008
-#define ZFCP_STATUS_PORT_NO_SCSI_ID            0x00000010
 #define ZFCP_STATUS_PORT_INVALID_WWPN          0x00000020
 
-/* for ports with well known addresses */
-#define ZFCP_STATUS_PORT_WKA \
-               (ZFCP_STATUS_PORT_NO_WWPN | \
-                ZFCP_STATUS_PORT_NO_SCSI_ID)
+/* well known address (WKA) port status*/
+enum zfcp_wka_status {
+       ZFCP_WKA_PORT_OFFLINE,
+       ZFCP_WKA_PORT_CLOSING,
+       ZFCP_WKA_PORT_OPENING,
+       ZFCP_WKA_PORT_ONLINE,
+};
 
 /* logical unit status */
-#define ZFCP_STATUS_UNIT_TEMPORARY             0x00000002
 #define ZFCP_STATUS_UNIT_SHARED                        0x00000004
 #define ZFCP_STATUS_UNIT_READONLY              0x00000008
 #define ZFCP_STATUS_UNIT_REGISTERED            0x00000010
 #define ZFCP_STATUS_UNIT_SCSI_WORK_PENDING     0x00000020
 
 /* FSF request status (this does not have a common part) */
-#define ZFCP_STATUS_FSFREQ_NOT_INIT            0x00000000
-#define ZFCP_STATUS_FSFREQ_POOL                0x00000001
 #define ZFCP_STATUS_FSFREQ_TASK_MANAGEMENT     0x00000002
 #define ZFCP_STATUS_FSFREQ_COMPLETED           0x00000004
 #define ZFCP_STATUS_FSFREQ_ERROR               0x00000008
 #define ZFCP_STATUS_FSFREQ_CLEANUP             0x00000010
-#define ZFCP_STATUS_FSFREQ_ABORTING            0x00000020
 #define ZFCP_STATUS_FSFREQ_ABORTSUCCEEDED      0x00000040
 #define ZFCP_STATUS_FSFREQ_ABORTNOTNEEDED       0x00000080
 #define ZFCP_STATUS_FSFREQ_ABORTED              0x00000100
@@ -361,45 +289,6 @@ struct zfcp_rc_entry {
 #define ZFCP_STATUS_FSFREQ_RETRY                0x00000800
 #define ZFCP_STATUS_FSFREQ_DISMISSED            0x00001000
 
-/*********************** ERROR RECOVERY PROCEDURE DEFINES ********************/
-
-#define ZFCP_MAX_ERPS                   3
-
-#define ZFCP_ERP_FSFREQ_TIMEOUT                (30 * HZ)
-#define ZFCP_ERP_MEMWAIT_TIMEOUT       HZ
-
-#define ZFCP_STATUS_ERP_TIMEDOUT       0x10000000
-#define ZFCP_STATUS_ERP_CLOSE_ONLY     0x01000000
-#define ZFCP_STATUS_ERP_DISMISSING     0x00100000
-#define ZFCP_STATUS_ERP_DISMISSED      0x00200000
-#define ZFCP_STATUS_ERP_LOWMEM         0x00400000
-
-#define ZFCP_ERP_STEP_UNINITIALIZED    0x00000000
-#define ZFCP_ERP_STEP_FSF_XCONFIG      0x00000001
-#define ZFCP_ERP_STEP_PHYS_PORT_CLOSING        0x00000010
-#define ZFCP_ERP_STEP_PORT_CLOSING     0x00000100
-#define ZFCP_ERP_STEP_NAMESERVER_OPEN  0x00000200
-#define ZFCP_ERP_STEP_NAMESERVER_LOOKUP        0x00000400
-#define ZFCP_ERP_STEP_PORT_OPENING     0x00000800
-#define ZFCP_ERP_STEP_UNIT_CLOSING     0x00001000
-#define ZFCP_ERP_STEP_UNIT_OPENING     0x00002000
-
-/* Ordered by escalation level (necessary for proper erp-code operation) */
-#define ZFCP_ERP_ACTION_REOPEN_ADAPTER         0x4
-#define ZFCP_ERP_ACTION_REOPEN_PORT_FORCED     0x3
-#define ZFCP_ERP_ACTION_REOPEN_PORT            0x2
-#define ZFCP_ERP_ACTION_REOPEN_UNIT            0x1
-
-#define ZFCP_ERP_ACTION_RUNNING                        0x1
-#define ZFCP_ERP_ACTION_READY                  0x2
-
-#define ZFCP_ERP_SUCCEEDED     0x0
-#define ZFCP_ERP_FAILED                0x1
-#define ZFCP_ERP_CONTINUES     0x2
-#define ZFCP_ERP_EXIT          0x3
-#define ZFCP_ERP_DISMISSED     0x4
-#define ZFCP_ERP_NOMEM         0x5
-
 /************************* STRUCTURE DEFINITIONS *****************************/
 
 struct zfcp_fsf_req;
@@ -436,7 +325,7 @@ struct ct_hdr {
  * a port name is required */
 struct ct_iu_gid_pn_req {
        struct ct_hdr header;
-       wwn_t wwpn;
+       u64 wwpn;
 } __attribute__ ((packed));
 
 /* FS_ACC IU and data unit for GID_PN nameserver request */
@@ -445,11 +334,9 @@ struct ct_iu_gid_pn_resp {
        u32 d_id;
 } __attribute__ ((packed));
 
-typedef void (*zfcp_send_ct_handler_t)(unsigned long);
-
 /**
  * struct zfcp_send_ct - used to pass parameters to function zfcp_fsf_send_ct
- * @port: port where the request is sent to
+ * @wka_port: port where the 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
@@ -461,12 +348,12 @@ typedef void (*zfcp_send_ct_handler_t)(unsigned long);
  * @status: used to pass error status to calling function
  */
 struct zfcp_send_ct {
-       struct zfcp_port *port;
+       struct zfcp_wka_port *wka_port;
        struct scatterlist *req;
        struct scatterlist *resp;
        unsigned int req_count;
        unsigned int resp_count;
-       zfcp_send_ct_handler_t handler;
+       void (*handler)(unsigned long);
        unsigned long handler_data;
        int timeout;
        struct completion *completion;
@@ -483,8 +370,6 @@ struct zfcp_gid_pn_data {
         struct zfcp_port *port;
 };
 
-typedef void (*zfcp_send_els_handler_t)(unsigned long);
-
 /**
  * struct zfcp_send_els - used to pass parameters to function zfcp_fsf_send_els
  * @adapter: adapter where request is sent from
@@ -508,22 +393,28 @@ struct zfcp_send_els {
        struct scatterlist *resp;
        unsigned int req_count;
        unsigned int resp_count;
-       zfcp_send_els_handler_t handler;
+       void (*handler)(unsigned long);
        unsigned long handler_data;
        struct completion *completion;
        int ls_code;
        int status;
 };
 
+struct zfcp_wka_port {
+       struct zfcp_adapter     *adapter;
+       wait_queue_head_t       completion_wq;
+       enum zfcp_wka_status    status;
+       atomic_t                refcount;
+       u32                     d_id;
+       u32                     handle;
+       struct mutex            mutex;
+       struct delayed_work     work;
+};
+
 struct zfcp_qdio_queue {
-       struct qdio_buffer *sbal[QDIO_MAX_BUFFERS_PER_Q]; /* SBALs */
-       u8                 first;             /* index of next free bfr
-                                                in queue (free_count>0) */
-       atomic_t           count;             /* number of free buffers
-                                                in queue */
-       rwlock_t           lock;              /* lock for operations on queue */
-       int                pci_batch;         /* SBALs since PCI indication
-                                                was last set */
+       struct qdio_buffer *sbal[QDIO_MAX_BUFFERS_PER_Q];
+       u8                 first;       /* index of next free bfr in queue */
+       atomic_t           count;       /* number of free buffers in queue */
 };
 
 struct zfcp_erp_action {
@@ -532,7 +423,7 @@ struct zfcp_erp_action {
        struct zfcp_adapter *adapter; /* device which should be recovered */
        struct zfcp_port *port;
        struct zfcp_unit *unit;
-       volatile u32 status;          /* recovery status */
+       u32             status;       /* recovery status */
        u32 step;                     /* active step of this erp action */
        struct zfcp_fsf_req *fsf_req; /* fsf request currently pending
                                         for this action */
@@ -563,8 +454,8 @@ struct zfcp_adapter {
        atomic_t                refcount;          /* reference count */
        wait_queue_head_t       remove_wq;         /* can be used to wait for
                                                      refcount drop to zero */
-       wwn_t                   peer_wwnn;         /* P2P peer WWNN */
-       wwn_t                   peer_wwpn;         /* P2P peer WWPN */
+       u64                     peer_wwnn;         /* P2P peer WWNN */
+       u64                     peer_wwpn;         /* P2P peer WWPN */
        u32                     peer_d_id;         /* P2P peer D_ID */
        struct ccw_device       *ccw_device;       /* S/390 ccw device */
        u32                     hydra_version;     /* Hydra version */
@@ -575,13 +466,13 @@ struct zfcp_adapter {
        u16                     timer_ticks;       /* time int for a tick */
        struct Scsi_Host        *scsi_host;        /* Pointer to mid-layer */
        struct list_head        port_list_head;    /* remote port list */
-       struct list_head        port_remove_lh;    /* head of ports to be
-                                                     removed */
-       u32                     ports;             /* number of remote ports */
        unsigned long           req_no;            /* unique FSF req number */
        struct list_head        *req_list;         /* list of pending reqs */
        spinlock_t              req_list_lock;     /* request list lock */
        struct zfcp_qdio_queue  req_q;             /* request queue */
+       spinlock_t              req_q_lock;        /* for operations on queue */
+       int                     req_q_pci_batch;   /* SBALs since PCI indication
+                                                     was last set */
        u32                     fsf_req_seq_no;    /* FSF cmnd seq number */
        wait_queue_head_t       request_wq;        /* can be used to wait for
                                                      more avaliable SBALs */
@@ -605,7 +496,7 @@ struct zfcp_adapter {
                                                      actions */
        u32                     erp_low_mem_count; /* nr of erp actions waiting
                                                      for memory */
-       struct zfcp_port        *nameserver_port;  /* adapter's nameserver */
+       struct zfcp_wka_port    nsp;               /* adapter's nameserver */
        debug_info_t            *rec_dbf;
        debug_info_t            *hba_dbf;
        debug_info_t            *san_dbf;          /* debug feature areas */
@@ -620,18 +511,13 @@ struct zfcp_adapter {
        struct zfcp_scsi_dbf_record     scsi_dbf_buf;
        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 */
        struct fc_host_statistics *fc_stats;
        struct fsf_qtcb_bottom_port *stats_reset_data;
        unsigned long           stats_reset;
        struct work_struct      scan_work;
+       atomic_t                qdio_outb_full;    /* queue full incidents */
 };
 
-/*
- * the struct device sysfs_device must be at the beginning of this structure.
- * pointer to struct device is used to free port structure in release function
- * of the device. don't change!
- */
 struct zfcp_port {
        struct device          sysfs_device;   /* sysfs device */
        struct fc_rport        *rport;         /* rport of fc transport class */
@@ -641,24 +527,18 @@ struct zfcp_port {
                                                  refcount drop to zero */
        struct zfcp_adapter    *adapter;       /* adapter used to access port */
        struct list_head       unit_list_head; /* head of logical unit list */
-       struct list_head       unit_remove_lh; /* head of luns to be removed
-                                                 list */
-       u32                    units;          /* # of logical units in list */
        atomic_t               status;         /* status of this remote port */
-       wwn_t                  wwnn;           /* WWNN if known */
-       wwn_t                  wwpn;           /* WWPN */
+       u64                    wwnn;           /* WWNN if known */
+       u64                    wwpn;           /* WWPN */
        u32                    d_id;           /* D_ID */
        u32                    handle;         /* handle assigned by FSF */
        struct zfcp_erp_action erp_action;     /* pending error recovery */
         atomic_t               erp_counter;
        u32                    maxframe_size;
        u32                    supported_classes;
+       struct work_struct     gid_pn_work;
 };
 
-/* the struct device sysfs_device must be at the beginning of this structure.
- * pointer to struct device is used to free unit structure in release function
- * of the device. don't change!
- */
 struct zfcp_unit {
        struct device          sysfs_device;   /* sysfs device */
        struct list_head       list;           /* list of logical units */
@@ -667,8 +547,7 @@ struct zfcp_unit {
                                                  refcount drop to zero */
        struct zfcp_port       *port;          /* remote port of unit */
        atomic_t               status;         /* status of this logical unit */
-       unsigned int           scsi_lun;       /* own SCSI LUN */
-       fcp_lun_t              fcp_lun;        /* own FCP_LUN */
+       u64                    fcp_lun;        /* own FCP_LUN */
        u32                    handle;         /* handle assigned by FSF */
         struct scsi_device     *device;        /* scsi device struct pointer */
        struct zfcp_erp_action erp_action;     /* pending error recovery */
@@ -691,11 +570,11 @@ struct zfcp_fsf_req {
        u8                      sbal_response;  /* SBAL used in interrupt */
        wait_queue_head_t      completion_wq;  /* can be used by a routine
                                                  to wait for completion */
-       volatile u32           status;         /* status of this request */
+       u32                     status;        /* status of this request */
        u32                    fsf_command;    /* FSF Command copy */
        struct fsf_qtcb        *qtcb;          /* address of associated QTCB */
        u32                    seq_no;         /* Sequence number of request */
-       unsigned long          data;           /* private data of request */
+       void                    *data;           /* private data of request */
        struct timer_list     timer;           /* used for erp or scsi er */
        struct zfcp_erp_action *erp_action;    /* used if this request is
                                                  issued on behalf of erp */
@@ -703,31 +582,27 @@ struct zfcp_fsf_req {
                                                  from emergency pool */
        unsigned long long     issued;         /* request sent time (STCK) */
        struct zfcp_unit       *unit;
+       void                    (*handler)(struct zfcp_fsf_req *);
 };
 
-typedef void zfcp_fsf_req_handler_t(struct zfcp_fsf_req*);
-
 /* driver data */
 struct zfcp_data {
        struct scsi_host_template scsi_host_template;
        struct scsi_transport_template *scsi_transport_template;
-        atomic_t                status;             /* Module status flags */
        struct list_head        adapter_list_head;  /* head of adapter list */
-       struct list_head        adapter_remove_lh;  /* head of adapters to be
-                                                      removed */
-       u32                     adapters;           /* # of adapters in list */
        rwlock_t                config_lock;        /* serialises changes
                                                       to adapter/port/unit
                                                       lists */
        struct semaphore        config_sema;        /* serialises configuration
                                                       changes */
        atomic_t                loglevel;            /* current loglevel */
-       char                    init_busid[BUS_ID_SIZE];
-       wwn_t                   init_wwpn;
-       fcp_lun_t               init_fcp_lun;
-       struct kmem_cache               *fsf_req_qtcb_cache;
-       struct kmem_cache               *sr_buffer_cache;
-       struct kmem_cache               *gid_pn_cache;
+       char                    init_busid[20];
+       u64                     init_wwpn;
+       u64                     init_fcp_lun;
+       struct kmem_cache       *fsf_req_qtcb_cache;
+       struct kmem_cache       *sr_buffer_cache;
+       struct kmem_cache       *gid_pn_cache;
+       struct workqueue_struct *work_queue;
 };
 
 /* struct used by memory pools for fsf_requests */
@@ -739,20 +614,12 @@ struct zfcp_fsf_req_qtcb {
 /********************** ZFCP SPECIFIC DEFINES ********************************/
 
 #define ZFCP_REQ_AUTO_CLEANUP  0x00000002
-#define ZFCP_WAIT_FOR_SBAL     0x00000004
 #define ZFCP_REQ_NO_QTCB       0x00000008
 
 #define ZFCP_SET                0x00000100
 #define ZFCP_CLEAR              0x00000200
 
-#ifndef atomic_test_mask
-#define atomic_test_mask(mask, target) \
-           ((atomic_read(target) & mask) == mask)
-#endif
-
 #define zfcp_get_busid_by_adapter(adapter) (adapter->ccw_device->dev.bus_id)
-#define zfcp_get_busid_by_port(port) (zfcp_get_busid_by_adapter(port->adapter))
-#define zfcp_get_busid_by_unit(unit) (zfcp_get_busid_by_port(unit->port))
 
 /*
  * Helper functions for request ID management.
@@ -762,15 +629,6 @@ static inline int zfcp_reqlist_hash(unsigned long req_id)
        return req_id % REQUEST_LIST_SIZE;
 }
 
-static inline void zfcp_reqlist_add(struct zfcp_adapter *adapter,
-                                   struct zfcp_fsf_req *fsf_req)
-{
-       unsigned int idx;
-
-       idx = zfcp_reqlist_hash(fsf_req->req_id);
-       list_add_tail(&fsf_req->list, &adapter->req_list[idx]);
-}
-
 static inline void zfcp_reqlist_remove(struct zfcp_adapter *adapter,
                                       struct zfcp_fsf_req *fsf_req)
 {
@@ -821,12 +679,6 @@ zfcp_unit_put(struct zfcp_unit *unit)
                wake_up(&unit->remove_wq);
 }
 
-static inline void
-zfcp_unit_wait(struct zfcp_unit *unit)
-{
-       wait_event(unit->remove_wq, atomic_read(&unit->refcount) == 0);
-}
-
 static inline void
 zfcp_port_get(struct zfcp_port *port)
 {
@@ -840,12 +692,6 @@ zfcp_port_put(struct zfcp_port *port)
                wake_up(&port->remove_wq);
 }
 
-static inline void
-zfcp_port_wait(struct zfcp_port *port)
-{
-       wait_event(port->remove_wq, atomic_read(&port->refcount) == 0);
-}
-
 static inline void
 zfcp_adapter_get(struct zfcp_adapter *adapter)
 {
@@ -859,10 +705,4 @@ zfcp_adapter_put(struct zfcp_adapter *adapter)
                wake_up(&adapter->remove_wq);
 }
 
-static inline void
-zfcp_adapter_wait(struct zfcp_adapter *adapter)
-{
-       wait_event(adapter->remove_wq, atomic_read(&adapter->refcount) == 0);
-}
-
 #endif /* ZFCP_DEF_H */