From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Charles Chiou <ch1102chiou@gmail.com>,
JBottomley@parallels.com, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [V2 PATCH 3/4] scsi:stex.c Add reboot support
Date: Fri, 14 Nov 2014 17:03:42 -0800 [thread overview]
Message-ID: <20141115010342.GA5933@kroah.com> (raw)
In-Reply-To: <20141112172750.GB18862@infradead.org>
On Wed, Nov 12, 2014 at 09:27:50AM -0800, Christoph Hellwig wrote:
> > +static int stex_reboot_callback(struct notifier_block *self,
> > + unsigned long val,
> > + void *data)
> > +{
> > + if (val == SYS_RESTART)
> > + isRestart = 1;
> > + return NOTIFY_OK;
> > +}
> >
> > @@ -1832,7 +1859,14 @@ static void stex_shutdown(struct pci_dev *pdev)
> > {
> > struct st_hba *hba = pci_get_drvdata(pdev);
> >
> > - stex_hba_stop(hba);
> > + if (hba->yellowstone == 1)
> > + stex_hba_stop(hba, ST_IGNORED);
> > + else {
> > + if (isRestart)
> > + stex_hba_stop(hba, ST_S6);
> > + else
> > + stex_hba_stop(hba, ST_S5);
> > + }
>
> This sort of check for reboot vs restart isn't really something
> we want in drivers. I don't really know how we could find this
> out assuming we even want drivers to behave differently.
>
> Maybe Greg or someone on lkml has an idea how to best handle this case.
What is "this case"?
And yes, I agree, we shouldn't care, in drivers, about reboot vs.
restart, as they should both be the same thing, along with "disconnect",
right?
thanks,
greg k-h
prev parent reply other threads:[~2014-11-15 1:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5462D62C.50602@gmail.com>
2014-11-12 17:27 ` [V2 PATCH 3/4] scsi:stex.c Add reboot support Christoph Hellwig
2014-11-13 10:07 ` Charles Chiou
2014-11-14 2:23 ` Charles Chiou
2014-11-15 1:03 ` Greg Kroah-Hartman [this message]
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=20141115010342.GA5933@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=JBottomley@parallels.com \
--cc=ch1102chiou@gmail.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/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).