lkml.org 
[lkml]   [2014]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [V2 PATCH 3/4] scsi:stex.c Add reboot support


On 11/13/2014 06:07 PM, Charles Chiou wrote:
>
>
> On 11/13/2014 01:27 AM, 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.


Hi, we don't attempt to check for restart vs reboot,
sorry for confusing. When host is going to restart/reboot, Pegasus need
to restart too. Pegasus use same flow for restart and reboot.

Maybe I could change variable name "isRestart" to "isReboot"?



\
 
 \ /
  Last update: 2014-11-14 04:01    [W:0.047 / U:1.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site