aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2008-01-31 14:36:52 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-02-07 19:02:37 -0500
commit322d739da83bbff0309c202181f79c08d9534880 (patch)
tree4bbe485dc4f942ac6d5c8ad1c4508599a1eb2c66 /include/scsi
parentc238c3bba9b422a9b453c75e157b416204f22a71 (diff)
[SCSI] iscsi: fix up iscsi printk prefix
Some iscsi class messages have the dev_printk prefix and some libiscsi and iscsi_tcp messages have "iscsi" or the module name as a prefix which is normally pretty useless when trying to figure out which session or connection the message is attached to. This patch adds iscsi lib and class dev_printks so all messages have a common prefix that can be used to figure out which object printed it. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/libiscsi.h7
-rw-r--r--include/scsi/scsi_transport_iscsi.h6
2 files changed, 13 insertions, 0 deletions
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index 278011fb3c2f..5784e4ff8edc 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -344,6 +344,10 @@ extern int iscsi_session_get_param(struct iscsi_cls_session *cls_session,
344#define session_to_cls(_sess) \ 344#define session_to_cls(_sess) \
345 hostdata_session(_sess->host->hostdata) 345 hostdata_session(_sess->host->hostdata)
346 346
347#define iscsi_session_printk(prefix, _sess, fmt, a...) \
348 iscsi_cls_session_printk(prefix, \
349 (struct iscsi_cls_session *)session_to_cls(_sess), fmt, ##a)
350
347/* 351/*
348 * connection management 352 * connection management
349 */ 353 */
@@ -358,6 +362,9 @@ extern void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err);
358extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn, 362extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn,
359 enum iscsi_param param, char *buf); 363 enum iscsi_param param, char *buf);
360 364
365#define iscsi_conn_printk(prefix, _c, fmt, a...) \
366 iscsi_cls_conn_printk(prefix, _c->cls_conn, fmt, ##a)
367
361/* 368/*
362 * pdu and task processing 369 * pdu and task processing
363 */ 370 */
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index 83693ba09c29..dbc96ef4cc72 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -212,6 +212,12 @@ struct iscsi_host {
212/* 212/*
213 * session and connection functions that can be used by HW iSCSI LLDs 213 * session and connection functions that can be used by HW iSCSI LLDs
214 */ 214 */
215#define iscsi_cls_session_printk(prefix, _cls_session, fmt, a...) \
216 dev_printk(prefix, &(_cls_session)->dev, fmt, ##a)
217
218#define iscsi_cls_conn_printk(prefix, _cls_conn, fmt, a...) \
219 dev_printk(prefix, &(_cls_conn)->dev, fmt, ##a)
220
215extern int iscsi_session_chkready(struct iscsi_cls_session *session); 221extern int iscsi_session_chkready(struct iscsi_cls_session *session);
216extern struct iscsi_cls_session *iscsi_alloc_session(struct Scsi_Host *shost, 222extern struct iscsi_cls_session *iscsi_alloc_session(struct Scsi_Host *shost,
217 struct iscsi_transport *transport); 223 struct iscsi_transport *transport);