RE: [PATCH 4/4] fusion: do not check serial_number in the abort handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2011-05-25 at 19:11 +0530, Desai, Kashyap wrote:
> > -----Original Message-----
> > From: linux-scsi-owner@xxxxxxxxxxxxxxx [mailto:linux-scsi-
> > owner@xxxxxxxxxxxxxxx] On Behalf Of Christoph Hellwig
> > Sent: Monday, April 04, 2011 7:13 PM
> > To: James.Bottomley@xxxxxxx
> > Cc: linux-scsi@xxxxxxxxxxxxxxx; Moore, Eric
> > Subject: [PATCH 4/4] fusion: do not check serial_number in the abort
> > handler
> > 
> > The SCSI midlayer stops all command processing when in error handling,
> > which
> > means there is no chance for command reuse when the abort handler is
> > called.
> > 
> > Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> > 
> > Index: linux-2.6/drivers/message/fusion/mptscsih.c
> > ===================================================================
> > --- linux-2.6.orig/drivers/message/fusion/mptscsih.c	2011-04-04
> > 06:25:45.526096602 -0700
> > +++ linux-2.6/drivers/message/fusion/mptscsih.c	2011-04-04
> > 06:26:07.036096337 -0700
> > @@ -1773,7 +1773,6 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
> >  	int		 scpnt_idx;
> >  	int		 retval;
> >  	VirtDevice	 *vdevice;
> > -	ulong	 	 sn = SCpnt->serial_number;
> >  	MPT_ADAPTER	*ioc;
> > 
> >  	/* If we can't locate our host adapter structure, return FAILED
> > status.
> > @@ -1859,8 +1858,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
> >  			 vdevice->vtarget->id, vdevice->lun,
> >  			 ctx2abort, mptscsih_get_tm_timeout(ioc));
> > 
> > -	if (SCPNT_TO_LOOKUP_IDX(ioc, SCpnt) == scpnt_idx &&
> > -	    SCpnt->serial_number == sn) {
> > +	if (SCPNT_TO_LOOKUP_IDX(ioc, SCpnt) == scpnt_idx) {
> >  		dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
> >  		    "task abort: command still in active list! (sc=%p)\n",
> >  		    ioc->name, SCpnt));
> > @@ -1873,9 +1871,9 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
> >  	}
> > 
> 
> This change looks good to me.!
> 
> >   out:
> > -	printk(MYIOC_s_INFO_FMT "task abort: %s (rv=%04x) (sc=%p)
> > (sn=%ld)\n",
> > +	printk(MYIOC_s_INFO_FMT "task abort: %s (rv=%04x) (sc=%p)\n",
> >  	    ioc->name, ((retval == SUCCESS) ? "SUCCESS" : "FAILED"),
> > retval,
> > -	    SCpnt, SCpnt->serial_number);
> > +	    SCpnt);
> 
> Can't we keep serial_number print for debugging purpose. ?

There's no real point ... it's a useless number unrelated to anything
else in the system (there's nothing you can really use it for in
debugging).

Plus once all of these patches are through, we'll eliminate the serial
number field from the host and command.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux