From: Charles Chiou <ch1102chiou@gmail.com>
To: Oliver Neukum <oneukum@suse.de>
Cc: Christoph Hellwig <hch@infradead.org>,
JBottomley@parallels.com, ed.lin@promise.com,
grace.chang@tw.promise.com, linus.chen@tw.promise.com,
victor.p@promise.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4 v4] scsi:stex.c Add S3/S4 support
Date: Thu, 18 Dec 2014 11:09:02 +0800 [thread overview]
Message-ID: <5492454E.8030203@gmail.com> (raw)
In-Reply-To: <1418722450.2448.3.camel@linux-0dmf.site>
On 12/16/2014 05:34 PM, Oliver Neukum wrote:
> On Tue, 2014-12-16 at 14:14 +0800, Charles Chiou wrote:
>> From f9d84df080c16097218092630db9b5df31d487b5 Mon Sep 17 00:00:00 2001
>> From: Charles Chiou <charles.chiou@tw.promise.com>
>> Date: Fri, 7 Nov 2014 10:15:18 +0800
>> Subject: [PATCH 4/4] scsi:stex.c Add S3/S4 support
>>
>> Add S3/S4 support, add .suspend and .resume function in pci_driver.
>>
>> Pegasus need 30~40 seconds to boot up. We don't want to OS wait
>> in .resume function. Create a thread to handle device boot up.
>
> I am sorry to be obnoxious, but this patch raises another
> question. What happens if the the system is suspended again
> while the work scheduled in resume is still running?
>
> Furthermore, what happens in the case of a PCI hotunplug while
> the work is still scheduled?
>
> Regards
> Oliver
>
>
Hi Oliver,
1. When OS is going to suspend again, .suspend function is active,
and driver prepare a command send to device, while firmware is
not ready. Firmware might loss this command and host can't go
to sleep. I'll fix this issue by add while loop to wait device
ready (polling hba->mu_status) and return -EBUSY if timeout.
I'll fix this issue in the next version. Thanks for your help.
2. When hotplug, .remove function is active. Return all commands to OS
with DID_NO_CONNECT status. And OS can remove the driver. After
experiment, it works well.
BRS
Charles
prev parent reply other threads:[~2014-12-18 3:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-16 6:14 [PATCH 4/4 v4] scsi:stex.c Add S3/S4 support Charles Chiou
2014-12-16 9:34 ` Oliver Neukum
2014-12-18 3:09 ` Charles Chiou [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=5492454E.8030203@gmail.com \
--to=ch1102chiou@gmail.com \
--cc=JBottomley@parallels.com \
--cc=ed.lin@promise.com \
--cc=grace.chang@tw.promise.com \
--cc=hch@infradead.org \
--cc=linus.chen@tw.promise.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=oneukum@suse.de \
--cc=victor.p@promise.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