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

Dave Dillow dillowda at ornl.gov
Sat Dec 22 10:14:12 PST 2007


On Sat, 2007-12-22 at 09:56 -0500, Pete Wyckoff wrote:
> dillowda at ornl.gov wrote on Fri, 21 Dec 2007 15:39 -0500:
> > 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

Did you mean to use those just for srp_path_rec_completion() or all of
them?

> struct Scsi_host, you can do one better and use shost_printk().

I'll look into using this. It'll be nice if it cleans things up.

The big thing I'm looking to implement is a stable identifier for a
given HBA port -> target port mapping, as the probing can be done
asynchronously, as can aborts/resets and such.

Dave



More information about the general mailing list