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.h124
1 files changed, 3 insertions, 121 deletions
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
index 5fcb555e1484..73425dbb2be8 100644
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -1,22 +1,9 @@
1/* 1/*
2 * This file is part of the zfcp device driver for 2 * zfcp device driver
3 * FCP adapters for IBM System z9 and zSeries.
4 * 3 *
5 * (C) Copyright IBM Corp. 2002, 2006 4 * Global definitions for the zfcp device driver.
6 * 5 *
7 * This program is free software; you can redistribute it and/or modify 6 * Copyright IBM Corporation 2002, 2008
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */ 7 */
21 8
22#ifndef ZFCP_DEF_H 9#ifndef ZFCP_DEF_H
@@ -52,9 +39,6 @@
52 39
53/********************* GENERAL DEFINES *********************************/ 40/********************* GENERAL DEFINES *********************************/
54 41
55/* zfcp version number, it consists of major, minor, and patch-level number */
56#define ZFCP_VERSION "4.8.0"
57
58/** 42/**
59 * zfcp_sg_to_address - determine kernel address from struct scatterlist 43 * zfcp_sg_to_address - determine kernel address from struct scatterlist
60 * @list: struct scatterlist 44 * @list: struct scatterlist
@@ -308,107 +292,6 @@ struct zfcp_rc_entry {
308 */ 292 */
309#define ZFCP_CT_TIMEOUT (3 * R_A_TOV) 293#define ZFCP_CT_TIMEOUT (3 * R_A_TOV)
310 294
311/******************** LOGGING MACROS AND DEFINES *****************************/
312
313/*
314 * Logging may be applied on certain kinds of driver operations
315 * independently. Additionally, different log-levels are supported for
316 * each of these areas.
317 */
318
319#define ZFCP_NAME "zfcp"
320
321/* independent log areas */
322#define ZFCP_LOG_AREA_OTHER 0
323#define ZFCP_LOG_AREA_SCSI 1
324#define ZFCP_LOG_AREA_FSF 2
325#define ZFCP_LOG_AREA_CONFIG 3
326#define ZFCP_LOG_AREA_CIO 4
327#define ZFCP_LOG_AREA_QDIO 5
328#define ZFCP_LOG_AREA_ERP 6
329#define ZFCP_LOG_AREA_FC 7
330
331/* log level values*/
332#define ZFCP_LOG_LEVEL_NORMAL 0
333#define ZFCP_LOG_LEVEL_INFO 1
334#define ZFCP_LOG_LEVEL_DEBUG 2
335#define ZFCP_LOG_LEVEL_TRACE 3
336
337/*
338 * this allows removal of logging code by the preprocessor
339 * (the most detailed log level still to be compiled in is specified,
340 * higher log levels are removed)
341 */
342#define ZFCP_LOG_LEVEL_LIMIT ZFCP_LOG_LEVEL_TRACE
343
344/* get "loglevel" nibble assignment */
345#define ZFCP_GET_LOG_VALUE(zfcp_lognibble) \
346 ((atomic_read(&zfcp_data.loglevel) >> (zfcp_lognibble<<2)) & 0xF)
347
348/* set "loglevel" nibble */
349#define ZFCP_SET_LOG_NIBBLE(value, zfcp_lognibble) \
350 (value << (zfcp_lognibble << 2))
351
352/* all log-level defaults are combined to generate initial log-level */
353#define ZFCP_LOG_LEVEL_DEFAULTS \
354 (ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_NORMAL, ZFCP_LOG_AREA_OTHER) | \
355 ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_NORMAL, ZFCP_LOG_AREA_SCSI) | \
356 ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_NORMAL, ZFCP_LOG_AREA_FSF) | \
357 ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_NORMAL, ZFCP_LOG_AREA_CONFIG) | \
358 ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_NORMAL, ZFCP_LOG_AREA_CIO) | \
359 ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_NORMAL, ZFCP_LOG_AREA_QDIO) | \
360 ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_NORMAL, ZFCP_LOG_AREA_ERP) | \
361 ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_NORMAL, ZFCP_LOG_AREA_FC))
362
363/* check whether we have the right level for logging */
364#define ZFCP_LOG_CHECK(level) \
365 ((ZFCP_GET_LOG_VALUE(ZFCP_LOG_AREA)) >= level)
366
367/* logging routine for zfcp */
368#define _ZFCP_LOG(fmt, args...) \
369 printk(KERN_ERR ZFCP_NAME": %s(%d): " fmt, __func__, \
370 __LINE__ , ##args)
371
372#define ZFCP_LOG(level, fmt, args...) \
373do { \
374 if (ZFCP_LOG_CHECK(level)) \
375 _ZFCP_LOG(fmt, ##args); \
376} while (0)
377
378#if ZFCP_LOG_LEVEL_LIMIT < ZFCP_LOG_LEVEL_NORMAL
379# define ZFCP_LOG_NORMAL(fmt, args...) do { } while (0)
380#else
381# define ZFCP_LOG_NORMAL(fmt, args...) \
382do { \
383 if (ZFCP_LOG_CHECK(ZFCP_LOG_LEVEL_NORMAL)) \
384 printk(KERN_ERR ZFCP_NAME": " fmt, ##args); \
385} while (0)
386#endif
387
388#if ZFCP_LOG_LEVEL_LIMIT < ZFCP_LOG_LEVEL_INFO
389# define ZFCP_LOG_INFO(fmt, args...) do { } while (0)
390#else
391# define ZFCP_LOG_INFO(fmt, args...) \
392do { \
393 if (ZFCP_LOG_CHECK(ZFCP_LOG_LEVEL_INFO)) \
394 printk(KERN_ERR ZFCP_NAME": " fmt, ##args); \
395} while (0)
396#endif
397
398#if ZFCP_LOG_LEVEL_LIMIT < ZFCP_LOG_LEVEL_DEBUG
399# define ZFCP_LOG_DEBUG(fmt, args...) do { } while (0)
400#else
401# define ZFCP_LOG_DEBUG(fmt, args...) \
402 ZFCP_LOG(ZFCP_LOG_LEVEL_DEBUG, fmt , ##args)
403#endif
404
405#if ZFCP_LOG_LEVEL_LIMIT < ZFCP_LOG_LEVEL_TRACE
406# define ZFCP_LOG_TRACE(fmt, args...) do { } while (0)
407#else
408# define ZFCP_LOG_TRACE(fmt, args...) \
409 ZFCP_LOG(ZFCP_LOG_LEVEL_TRACE, fmt , ##args)
410#endif
411
412/*************** ADAPTER/PORT/UNIT AND FSF_REQ STATUS FLAGS ******************/ 295/*************** ADAPTER/PORT/UNIT AND FSF_REQ STATUS FLAGS ******************/
413 296
414/* 297/*
@@ -846,7 +729,6 @@ struct zfcp_data {
846 char init_busid[BUS_ID_SIZE]; 729 char init_busid[BUS_ID_SIZE];
847 wwn_t init_wwpn; 730 wwn_t init_wwpn;
848 fcp_lun_t init_fcp_lun; 731 fcp_lun_t init_fcp_lun;
849 char *driver_version;
850 struct kmem_cache *fsf_req_qtcb_cache; 732 struct kmem_cache *fsf_req_qtcb_cache;
851 struct kmem_cache *sr_buffer_cache; 733 struct kmem_cache *sr_buffer_cache;
852 struct kmem_cache *gid_pn_cache; 734 struct kmem_cache *gid_pn_cache;