[ofa-general] [PATCH] IB/srp: add identifying information to log messages

Pete Wyckoff pw at osc.edu
Sat Dec 22 06:56:12 PST 2007


dillowda at ornl.gov wrote on Fri, 21 Dec 2007 15:39 -0500:
> When you have multiple targets, it gets really confusing when you try to
> track down who did a reset when there is no identifying information in
> the log message, especially when the same extension ID is mapped through
> two different local IB ports. So, add an identifier that can be used to
> track back to which local IB port/remote target pair is the one having
> problems.
> 
> Signed-off-by: David Dillow <dillowda at ornl.gov>
> ---
> This is against the previous three patches to respect the credit limit
> and allow scatter/gather. I may apply with offsets without those.
> 
>  ib_srp.c |   79 +++++++++++++++++++++++++++++++++++++++++----------------------
>  1 file changed, 52 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
> index 4f58f94..717f186 100644
> --- a/drivers/infiniband/ulp/srp/ib_srp.c
> +++ b/drivers/infiniband/ulp/srp/ib_srp.c
> @@ -272,7 +272,8 @@ static void srp_path_rec_completion(int status,
>  
>  	target->status = status;
>  	if (status)
> -		printk(KERN_ERR PFX "Got failed path rec status %d\n", status);
> +		printk(KERN_ERR PFX "scsi%d: Got failed path rec status %d\n",
> +		       target->scsi_host->host_no, status);

Good idea to fix these.

Could you use the standard dev_err(), dev_printk() and friends here
instead?  dev = &target->scsi_host->shost_gendev.  In fact, for
struct Scsi_host, you can do one better and use shost_printk().

		-- Pete



More information about the general mailing list