linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@in.ibm.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: "Miller, Mike (OS Dev)" <Mike.Miller@hp.com>,
	linux-kernel@vger.kernel.org,
	ISS StorageDev <iss_storagedev@hp.com>,
	akpm@linux-foundation.org
Subject: Re: [PATCH] cciss: force ignore of responses to unsent scsi commands after kexec reboot
Date: Mon, 18 Jun 2007 10:00:37 +0530	[thread overview]
Message-ID: <20070618043037.GA14758@in.ibm.com> (raw)
In-Reply-To: <20070614192523.GB1110@hmsreliant.homelinux.net>

On Thu, Jun 14, 2007 at 03:25:23PM -0400, Neil Horman wrote:
> On Thu, Jun 14, 2007 at 06:16:03PM -0000, Miller, Mike (OS Dev) wrote:
> >  
> > 
> > > -----Original Message-----
> > > From: Neil Horman [mailto:nhorman@tuxdriver.com] 
> > > Sent: Thursday, June 14, 2007 10:31 AM
> > > To: linux-kernel@vger.kernel.org
> > > Cc: Miller, Mike (OS Dev); ISS StorageDev; 
> > > akpm@linux-foundation.org; nhorman@tuxdriver.com
> > > Subject: [PATCH] cciss: force ignore of responses to unsent 
> > > scsi commands after kexec reboot
> > > 
> > > Hey -
> > > 	cciss hardware currently can continue to send responses 
> > > to scsi commands after the host system has undergone a kexec 
> > > reboot.  The way the drier is currently written, reception of 
> > > these commands results in a BUG halt, since it can't match 
> > > the response to any issued command since the boot.  This 
> > > patch corrects that by using the kexec reset_devices command 
> > > line paramter to force ignore any commands that it cant correlate.
> > > 
> > > Regards
> > > Neil
> > > 
> > > Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> > > 
> > > 
> > >  cciss.c |    8 ++++++++
> > >  1 file changed, 8 insertions(+)
> > > 
> > > 
> > > diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c 
> > > index 5acc6c4..ec1c1d2 100644
> > > --- a/drivers/block/cciss.c
> > > +++ b/drivers/block/cciss.c
> > > @@ -2131,6 +2131,14 @@ static int add_sendcmd_reject(__u8 
> > > cmd, int ctlr, unsigned long complete)
> > >  		       ctlr, complete);
> > >  		/* not much we can do. */
> > >  #ifdef CONFIG_CISS_SCSI_TAPE
> > > +		/* We might get notification of completion of commands
> > > +		 * which we never issued in this kernel if this boot is
> > > +		 * taking place after previous kernel's crash. Simply
> > > +		 * ignore the commands in this case.
> > > +		 */
> > > +		if (reset_devices)
> > > +			return 0;
> > > +
> > >  		return 1;
> > >  	}

I think this is not the right usage of reset_devices parameter. This
parameter instructs the driver to reset the device before going ahead
with rest of the initialization before as underlying device might not
be in a sane state. kexec/kdump is one of the usages and this can also
be useful in the case of BIOS not doing its job.

When I had proposed crash_boot parameter for kexec/kdump purposes, that time
andrew had suggested that he is afraid that driver authors will use this
parameter to solve all kind of problems. 

I think we should stick to the theme of the parameter and implement the
reset routine for cciss driver instead of simply returning back. Consider
the case of hypothetical scenario where somebody booted the kernel with
reset_device parameter (because of unreliable bios) and if there is a problem
on kernel side that after it issues the command it lost track of that
(because of kernel bug) then driver will never catch that bug as upon receiving
the response it will simply ignore that.

Mike, you know most about this device. Can you please help out with 
implementing a reset routing for it?

Thanks
Vivek

  reply	other threads:[~2007-06-18  4:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-14 15:31 [PATCH] cciss: force ignore of responses to unsent scsi commands after kexec reboot Neil Horman
2007-06-14 15:59 ` Randy Dunlap
2007-06-14 16:44   ` Neil Horman
2007-06-14 18:16 ` Miller, Mike (OS Dev)
2007-06-14 19:25   ` Neil Horman
2007-06-18  4:30     ` Vivek Goyal [this message]
2007-06-18 16:39       ` Miller, Mike (OS Dev)
2007-07-03 15:59 ` Miller, Mike (OS Dev)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070618043037.GA14758@in.ibm.com \
    --to=vgoyal@in.ibm.com \
    --cc=Mike.Miller@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=iss_storagedev@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).