summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ipr.h
diff options
context:
space:
mode:
authorbrking@us.ibm.com <brking@us.ibm.com>2005-11-01 17:00:27 -0600
committerJames Bottomley <jejb@mulgrave.(none)>2005-11-06 13:00:34 -0600
commitfa15b1f6be4764bfeb29b0cf74442ea6dbb2ec9d (patch)
treebb771a9e93dfe50f61616109ccbf37892bef357b /drivers/scsi/ipr.h
parentcfc321397e9e309a8148c18c32ade26ac40be39d (diff)
downloadlinux-fa15b1f6be4764bfeb29b0cf74442ea6dbb2ec9d.tar.bz2
[SCSI] ipr: Physical resource error logging macro
Adds a macro in the ipr driver for logging a physical device location. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/ipr.h')
-rw-r--r--drivers/scsi/ipr.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h
index 01950b9d2e6d..b8c1603f99eb 100644
--- a/drivers/scsi/ipr.h
+++ b/drivers/scsi/ipr.h
@@ -1123,6 +1123,17 @@ struct ipr_ucode_image_header {
#define ipr_res_dbg(ioa_cfg, res, fmt, ...) \
IPR_DBG_CMD(ipr_res_printk(KERN_INFO, ioa_cfg, res, fmt, ##__VA_ARGS__))
+#define ipr_phys_res_err(ioa_cfg, res, fmt, ...) \
+{ \
+ if ((res).bus >= IPR_MAX_NUM_BUSES) { \
+ ipr_err(fmt": unknown\n", ##__VA_ARGS__); \
+ } else { \
+ ipr_err(fmt": %d:%d:%d:%d\n", \
+ ##__VA_ARGS__, (ioa_cfg)->host->host_no, \
+ (res).bus, (res).target, (res).lun); \
+ } \
+}
+
#define ipr_trace ipr_dbg("%s: %s: Line: %d\n",\
__FILE__, __FUNCTION__, __LINE__)