From fa15b1f6be4764bfeb29b0cf74442ea6dbb2ec9d Mon Sep 17 00:00:00 2001 From: "brking@us.ibm.com" Date: Tue, 1 Nov 2005 17:00:27 -0600 Subject: [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 Signed-off-by: James Bottomley --- drivers/scsi/ipr.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'drivers/scsi/ipr.h') diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h index 01950b9d2e6..b8c1603f99e 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__) -- cgit v1.2.3-18-g5258