aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorRobert Love <robert.w.love@intel.com>2009-11-03 14:45:58 -0500
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 13:00:55 -0500
commit8866a5d9075b7129194576f5f810e85a693c40ba (patch)
tree8976fd0009ab5870457ca0ecd7a246852744f00c /include/scsi
parent255f6386b816b2bc0c251af0ee4985ad5a8461b7 (diff)
[SCSI] libfc: Add libfc/fc_libfc.[ch] for libfc internal routines
include/scsi/libfc.h is currently loaded with common code shared between libfc's sub-modules as well as shared between libfc and fcoe. Previous patches attempted to move out non-common code. This patch creates two files for common libfc routines that will not be shared with fcoe, fnic or any other LLDs. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/libfc.h79
1 files changed, 0 insertions, 79 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index db2175da2da5..690f8296e633 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -34,67 +34,6 @@
34 34
35#include <scsi/fc_frame.h> 35#include <scsi/fc_frame.h>
36 36
37#define FC_LIBFC_LOGGING 0x01 /* General logging, not categorized */
38#define FC_LPORT_LOGGING 0x02 /* lport layer logging */
39#define FC_DISC_LOGGING 0x04 /* discovery layer logging */
40#define FC_RPORT_LOGGING 0x08 /* rport layer logging */
41#define FC_FCP_LOGGING 0x10 /* I/O path logging */
42#define FC_EM_LOGGING 0x20 /* Exchange Manager logging */
43#define FC_EXCH_LOGGING 0x40 /* Exchange/Sequence logging */
44#define FC_SCSI_LOGGING 0x80 /* SCSI logging (mostly error handling) */
45
46extern unsigned int fc_debug_logging;
47
48#define FC_CHECK_LOGGING(LEVEL, CMD) \
49do { \
50 if (unlikely(fc_debug_logging & LEVEL)) \
51 do { \
52 CMD; \
53 } while (0); \
54} while (0)
55
56#define FC_LIBFC_DBG(fmt, args...) \
57 FC_CHECK_LOGGING(FC_LIBFC_LOGGING, \
58 printk(KERN_INFO "libfc: " fmt, ##args))
59
60#define FC_LPORT_DBG(lport, fmt, args...) \
61 FC_CHECK_LOGGING(FC_LPORT_LOGGING, \
62 printk(KERN_INFO "host%u: lport %6x: " fmt, \
63 (lport)->host->host_no, \
64 fc_host_port_id((lport)->host), ##args))
65
66#define FC_DISC_DBG(disc, fmt, args...) \
67 FC_CHECK_LOGGING(FC_DISC_LOGGING, \
68 printk(KERN_INFO "host%u: disc: " fmt, \
69 (disc)->lport->host->host_no, \
70 ##args))
71
72#define FC_RPORT_ID_DBG(lport, port_id, fmt, args...) \
73 FC_CHECK_LOGGING(FC_RPORT_LOGGING, \
74 printk(KERN_INFO "host%u: rport %6x: " fmt, \
75 (lport)->host->host_no, \
76 (port_id), ##args))
77
78#define FC_RPORT_DBG(rdata, fmt, args...) \
79 FC_RPORT_ID_DBG((rdata)->local_port, (rdata)->ids.port_id, fmt, ##args)
80
81#define FC_FCP_DBG(pkt, fmt, args...) \
82 FC_CHECK_LOGGING(FC_FCP_LOGGING, \
83 printk(KERN_INFO "host%u: fcp: %6x: " fmt, \
84 (pkt)->lp->host->host_no, \
85 pkt->rport->port_id, ##args))
86
87#define FC_EXCH_DBG(exch, fmt, args...) \
88 FC_CHECK_LOGGING(FC_EXCH_LOGGING, \
89 printk(KERN_INFO "host%u: xid %4x: " fmt, \
90 (exch)->lp->host->host_no, \
91 exch->xid, ##args))
92
93#define FC_SCSI_DBG(lport, fmt, args...) \
94 FC_CHECK_LOGGING(FC_SCSI_LOGGING, \
95 printk(KERN_INFO "host%u: scsi: " fmt, \
96 (lport)->host->host_no, ##args))
97
98/* 37/*
99 * libfc error codes 38 * libfc error codes
100 */ 39 */
@@ -924,11 +863,6 @@ int fc_change_queue_type(struct scsi_device *sdev, int tag_type);
924void fc_fcp_destroy(struct fc_lport *); 863void fc_fcp_destroy(struct fc_lport *);
925 864
926/* 865/*
927 * Set up direct-data placement for this I/O request
928 */
929void fc_fcp_ddp_setup(struct fc_fcp_pkt *fsp, u16 xid);
930
931/*
932 * ELS/CT interface 866 * ELS/CT interface
933 *****************************/ 867 *****************************/
934/* 868/*
@@ -1020,17 +954,4 @@ void fc_get_host_port_state(struct Scsi_Host *shost);
1020void fc_set_rport_loss_tmo(struct fc_rport *rport, u32 timeout); 954void fc_set_rport_loss_tmo(struct fc_rport *rport, u32 timeout);
1021struct fc_host_statistics *fc_get_host_stats(struct Scsi_Host *); 955struct fc_host_statistics *fc_get_host_stats(struct Scsi_Host *);
1022 956
1023/*
1024 * module setup functions.
1025 */
1026int fc_setup_exch_mgr(void);
1027void fc_destroy_exch_mgr(void);
1028int fc_setup_rport(void);
1029void fc_destroy_rport(void);
1030
1031/*
1032 * Internal libfc functions.
1033 */
1034const char *fc_els_resp_type(struct fc_frame *);
1035
1036#endif /* _LIBFC_H_ */ 957#endif /* _LIBFC_H_ */